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.
When selecting something in the editor, pressing Alt-Enter invokes the pop-up menu with the context-sensitve actions of the little yellow light bulb in the left side vertical gutter. There are some issues with this: - When pressing the short-cut, the pop-up menu should appear right under the curser, not at the left side of the editor. - The short-cut should also work when the cursor is just inside or at the border of a token and not only if the token is selected (see Eclipse) - The short-cut should be changed from Alt-Enter to Ctrl-1 (D-1) because: - Alt-Enter is hard to use with one hand (at least on a keyboard with a de_CH layout) - Ctrl-1 is the short-cut used in Eclipse and would help make developers coming from Eclipse to feel at home more quickly.
Hi, thank you for these suggestions. I will change the issue status to enhancement, as what you describe is not a defective behavior - it currently works as designed. > The short-cut should also work when the cursor is just inside or at the > border of a token and not only if the token is selected (see Eclipse) Well, it already does so - type "Thread.sleep(1000);" in some method that doesn't handle thrown exception. Then place caret above "Thread" (do not select the word, just place caret in the middle) and press Alt+Enter... You will get some suggestion about how to handle the problem with thrown exception... Selection is needed only when there is no problem and hints are suggestive - and IMO the selection is required principally. You need to have some text selected in order to surround it with "for", "while", etc...
Well, it's true for the cases like Thread.sleep, but in Eclipse you can eg. create a constructor, define some parameters and at the end of the parameter name you press Ctrl-1 -> you get the option "Assign parameter to new field". No selection is required. >Selection is needed only when there is no problem and hints are suggestive - and IMO the selection is required >principally. You need to have some text selected in order to surround it with "for", "while", etc... In Eclipse, some times there are different actions when selecting a token/ expression than when the cursor is just inside or at the border of an unselected token. But at least the selection of a single token seems to be unnecessary to me, since you can handle the token at the current cursor position as though it were selected. (Which seems not to be the case in Eclipse as you get the "Change modifier to final" option only if the parameter is selected, but maybe we can do better. :-) )
Interestingly, sometimes it is not needed to select the token, eg. for "Assign Return Value To New Variable".
Assignment to CTRL-1 is already fixed in Eclipse keymap. The rest is a RFE for Editor Hints module.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss