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.
Code Completion, Editor Hint and Surrond With actions are not present in the main menu. Both actions are crucial for user productivity. They have to be present in the main menu. Consider adding also action for Parameter Tip. (What happened to "Override Methods" and "Fix Imports"?). Recommendation: Add all actions into the source menu. Ordering and naming: | Source | ---------- Complete Code... Fix Code... Surround With... Show Parameter Info ------------------------------- Insert Next Matching Word Insert Previous Matching Word ------------------------------- Reformat Code Remove Trailing Spaces Shift Left Shift Right Comment Uncomment ------------------------------- Preprocessor Blocks > Should be fixed for 6.0 M10. Reassign to responsible engineer. Jano Rojcek is your usability contact.
Answers: 1) Fix imports still exists and should probably be put back to source menu 2) Override methods does not exist any more. You can override/implement methods using a) code completion b) the code generation dialog Alt+Insert. We probably should put the Code generation action into the menu as well there already is such RFE by Petr Jiricka in isuezilla. It probably should be something like "generate code" with a submenu containing all the items from Alt+Insert Qestions: 1) What to do with surroound with. There is a hint when user selects something to surround with lot of things. The only way how to get it into main menu would be again some action with submenu. The enablement of the action could be a bit tricky.
I reordered the actions supplied by editor and added Generate Code and Fix Imports to java editor. Not sure what to do about Surround with or Show Parameter Info. Checking in dev/editor/src/org/netbeans/modules/editor/resources/layer.xml; /cvs/editor/src/org/netbeans/modules/editor/resources/layer.xml,v <-- layer.xml new revision: 1.93; previous revision: 1.92 done Checking in dev/java/editor/src/org/netbeans/modules/java/editor/codegen/GenerateCodeAction.java; /cvs/java/editor/src/org/netbeans/modules/java/editor/codegen/GenerateCodeAction.java,v <-- GenerateCodeAction.java new revision: 1.7; previous revision: 1.6 done Checking in dev/java/editor/src/org/netbeans/modules/java/editor/codegen/Bundle.properties; /cvs/java/editor/src/org/netbeans/modules/java/editor/codegen/Bundle.properties,v <-- Bundle.properties new revision: 1.5; previous revision: 1.4 done Checking in dev/java/editor/src/org/netbeans/modules/editor/java/JavaKit.java; /cvs/java/editor/src/org/netbeans/modules/editor/java/JavaKit.java,v <-- JavaKit.java new revision: 1.37; previous revision: 1.36 done Checking in dev/java/editor/src/org/netbeans/modules/editor/java/Bundle.properties; /cvs/java/editor/src/org/netbeans/modules/editor/java/Bundle.properties,v <-- Bundle.properties new revision: 1.22; previous revision: 1.21 done Checking in dev/java/editor/src/org/netbeans/modules/java/editor/resources/layer.xml; /cvs/java/editor/src/org/netbeans/modules/java/editor/resources/layer.xml,v <-- layer.xml new revision: 1.24; previous revision: 1.23 done
Thanks Vito! I want to do a UI spec for all main menus for 6.0 soon. In the UI spec, I would try to address the "surround with" action as well (not sure how yet ;-).
This actually seems like a good issue instead of creating a new specific issue. I have seen different questions like...where is such and such. And the such and such will be something like "Generate setters/getters". It seems like most actions under source are actually refactoring. It seems logical, to especially address the different questions, that the two menus be merged. I thought about filing a separate RFE. I just answered a question about this on nbusers. The person didn't think about looking for the setter/getter generation under the "Generate source" menu, and did not think about the "Source" menu. They thought refactor. I have to admit that the same thing happened to me at first on a couple things as well. I, having used NB for a good while, then looked to the other menu, but it was still less productive. I had to think about it. This even seems to be the case with the context menus, Refactor is a sub-menu where as the "Generate source" item opens up another window very dissimilar from the refactor experience where one then has to click again then the action occurs. It just seems to me, as one who both answers questions on nbusers and uses the IDE every single day, that having these menus consolidated into one would be a boost to productivity....i.e move sub-menus/context menus to (Context)->Refactor and move the Source top level menu to Refactor. There are very few actions in Source which don't make just as much or more sense under refactor. What does everyone else think? I think this will in the end lead us down another issue...what happens when menus get too large for the screen...we will need them to be scrollable...another issue I have been needing to file as "Windows" and "Tools" is already too large with different extras and my own custom modules installed.
"Generate getter/setter" and "encapsulate field" are not the same thing. The former is a simple syntax manipulation, the latter is a real refactoring action (and generate getter/setter is just a portion of the refactoring). After "Generate getter/setter", you still have void myBizMethod() { this.myField.doSomething(); .... } But after "encapsulate field", you normally want to have void myBizMethod() { getMyField().doSomething(); .... } whereby limiting direct access to field, and possibly "extra-processing" the field in the getter before handing it out. MyField getMyField() { if (this.myField == null) { this.myField = bigFatLookupInitMyField(); } return this.myField; } And for those who don't like directly "field intercept" in AOP, they can give advises on the getter/setter after the encapsulation. As for "Generate getter/setter", none of the above-mentioned is a concern - it's just a dump syntax generation that's pretty handy in terms of coding productivity.
Some more changes done. Still not according to spec. cvs server: scheduling file `LineActionsMainMenu.java' for addition cvs server: use 'cvs commit' to add this file permanently Checking in editor/src/org/netbeans/modules/editor/resources/layer.xml; /cvs/editor/src/org/netbeans/modules/editor/resources/layer.xml,v <-- layer.xml new revision: 1.98; previous revision: 1.97 done Checking in editor/src/org/netbeans/modules/editor/Bundle.properties; /cvs/editor/src/org/netbeans/modules/editor/Bundle.properties,v <-- Bundle.properties new revision: 1.54; previous revision: 1.53 done RCS file: /cvs/editor/src/org/netbeans/modules/editor/impl/actions/LineActionsMainMenu.java,v done Checking in editor/src/org/netbeans/modules/editor/impl/actions/LineActionsMainMenu.java; /cvs/editor/src/org/netbeans/modules/editor/impl/actions/LineActionsMainMenu.java,v <-- LineActionsMainMenu.java initial revision: 1.1 done Checking in editor/src/org/netbeans/modules/editor/impl/actions/Bundle.properties; /cvs/editor/src/org/netbeans/modules/editor/impl/actions/Bundle.properties,v <-- Bundle.properties new revision: 1.4; previous revision: 1.3 done Checking in java/editor/src/org/netbeans/modules/java/editor/resources/layer.xml; /cvs/java/editor/src/org/netbeans/modules/java/editor/resources/layer.xml,v <-- layer.xml new revision: 1.29; previous revision: 1.28 done
*** This issue has been marked as a duplicate of 107825 ***