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.
Summary: | Clean up o.n.editor.Registry | ||
---|---|---|---|
Product: | editor | Reporter: | Vitezslav Stejskal <vstejskal> |
Component: | -- Other -- | Assignee: | Vitezslav Stejskal <vstejskal> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | API |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | TASK | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 181156 | ||
Attachments: |
Trunk changes
mian/contrib changes |
Description
Vitezslav Stejskal
2010-01-11 04:03:03 UTC
Created attachment 93171 [details]
Trunk changes
Created attachment 93172 [details]
mian/contrib changes
This is just a notification that I'm going to clean up o.n.editor.Registry a little bit. The class has been deprecated for quite some time now, but despite of that it was still used in both the editor infrastructure and other modules. The attached patches contain changes needed to remove all the existing usages in Netbeans codebase (trunk + main/contrib) and to bridge the implementation to the official o.n.api.editor.EditorRegistry. I used @PatchedPublic to hide some of the Registry's API methods while preserving the class' backwards compatibility. Sadly @PatchedPublic doesn't seem to be applicable on a class, so I could not remove the whole o.n.e.Registry. http://hg.netbeans.org/jet-main/rev/7dd78ba4d67d I'll integrate the patch for main/contrib when 7dd78ba4d67d passes through the builders. Integrated into 'main-golden', will be available in build *201001120200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/7dd78ba4d67d User: Vita Stejskal <vstejskal@netbeans.org> Log: #179368: cleaning up o.n.editor.Registry and its usages main/contrib patch applied - http://hg.netbeans.org/main/contrib/rev/7b25cbdaa32b I think it is not fully compatible. I did some test and face problems with Registry.getMostActiveDocument where it thrown an NPE when I select an action at the menu, as Copy FQN for example, since when I invoke the action it access this method but the editor has no focus anymore, so I used EditorRegistry.lastFocusedComponent() instead EditorRegistry.focusedComponent(). Maybe this is an inconsistency since CopyFQN works very well in 6.8 with any modification? I am not sure if here is the correct place to this comment, maybe should I file an new issue? Well, if there are NPEs or other regressions caused by this change please file a new defect with stackraces or steps reproducing the problem. And I'll have a look. Integrated into 'main-golden', will be available in build *201003050200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/439d8ed95829 User: Vita Stejskal <vstejskal@netbeans.org> Log: #179368: using safer ER.lastFocusedComponent rather than just ER.focusedComponent as suggested by hmichel in #181156 |