This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 194809 - Typing Hooks API doesn't provide API to create tests
Summary: Typing Hooks API doesn't provide API to create tests
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks: 152655
  Show dependency tree
 
Reported: 2011-01-28 12:45 UTC by Vladimir Voskresensky
Modified: 2011-01-28 14:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2011-01-28 12:45:58 UTC
we shifted to new Hooks API, but we can not migrate our unit tests, because no way to create *Context objects.

based on discussion with David, Jan, and Alexander:
Creating the Context(s) should be possible using:
org.netbeans.modules.editor.lib2.typinghooks.TypingHooksSpiAccessor.get().create*Context(...)

Please, provide access to it from tests

Thanks,
Vladimir.
Comment 1 Vladimir Voskresensky 2011-01-28 14:57:25 UTC
as Jan pointed out it should already work from test packages:
The TypingHooksSpiAccessor is a public class, and the methods are public, so these are accessible from anywhere in the unit tests (there are no module level access restrictions inside unit tests). Of course the accessor's method may change, but if that is likely to only require simple updates in the tests.