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: | @EditorActionRegistration in editor module overrides registrations from editor.lib w/o weight attr | ||
---|---|---|---|
Product: | editor | Reporter: | Jesse Glick <jglick> |
Component: | Actions/Menu/Toolbar | Assignee: | Miloslav Metelka <mmetelka> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | API, API_REVIEW_FAST |
Priority: | P3 | ||
Version: | 7.0 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 141925 | ||
Bug Blocks: | 150875, 204686 | ||
Attachments: | Proposed diff |
Description
Jesse Glick
2011-07-01 14:12:31 UTC
174a04b221c1 is the current workaround in the test, by the way. I'll add the weight attribute into the @EditorActionRegistration. Thanks. Do not forget to revert 174a04b221c1 when fixing. Created attachment 113170 [details]
Proposed diff
Diff adds the weight attribute to @EditorActionRegistration. I have reverted 174a04b221c1 and uncommented NbBuildPopupAction in NbEditorKit and the test failed. After adding weight attribute the test passed. Jesse, are there any guidelines for the weight attribute values? I have used weight = 100 in NbEditorKit. Since EditorActionRegistration is API I request a fasttrack review. Thanks. [JG01] Typo "ommited" [JG02] Do not link to "http://bits.netbeans.org/6.9/javadoc/". Use "@TOP@/" instead. But anyway there is no need to link to apichanges because the mechanism is covered in Javadoc proper; use {@link org.openide.filesystems.MultiFileSystem}. [JG03] Check build-popup-menu.instance which suffered from the same problem, at least when I worked around it in ValidateLayerConsistencyTest. (In reply to comment #5) > are there any guidelines for the weight attribute values? Nothing in particular, this patch looks OK to me. Thanks, Jesse. http://hg.netbeans.org/jet-main/rev/4dbcb49c751c One minor thing I forgot to mention before: [JG04] The natural default value for weight is 0, not MIN_VALUE: you can make files "recessive" by giving them negative weights just as they can be "dominant" with positive weights, and <attr name="weight" intvalue="0"/> is a no-op. Thus I would recommend int weight() default 0; and having the processor check if (weight != 0) ... default weight is now 0. Thanks. http://hg.netbeans.org/jet-main/rev/942e801cbb4f Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/4dbcb49c751c User: Miloslav Metelka <mmetelka@netbeans.org> Log: #199823 - @EditorActionRegistration in editor module overrides registrations from editor.lib w/o weight attr. |