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.
The Editor doesn't behave the same when a class member is highlighted and not. _When the member variable is NOT highlighted then the editor (while pressing the right mouse button) will display a menu with the possibility to "Generate R/W property for field" (in tool sub menu) _When the member variable is highlighted then the editor (while pressing the right mouse button) will NOT display the possibility to "Generate R/W property for field" in the menu.
I don't know where is a problem, so reassigne to java for investigation ....
I am sorry I cannot reproduce it. It works for me. Please add steps how to reproduce it. Thanks.
It is pretty simple to reproduce it. But I'm not sure if this behavior is not as designed. If you textually select the field in the editor, yu are not able to generate R/W property.
I don't think that this is the right behavior to not enable the creation of the properties when a field is highlighted, since usually when you want to perform an action on something then you always select it by double clicking in it, then you use a contextual menu for the action. Getting a contextual menu for 'generating R/W properties' when the field is not selected, is less intuitive. By the way, if the field is marked 'static' or 'final' then highlighted or not the menu will not permit the creation of R/W property that is not the right behavior also. I think that the behavior should be: 1. If the field is marked 'final' then it should not be possible to generate Write property for field but the Read should be permitted. 2. If the field is marked is NOT marked final then R/W properties should be enable. A new sub menu should be redisigned to permit 3 operations: 1. generate R/W (desabled - if field is marked final) 2. generate R 3. generate W (desabled - if field is marked final) Therefore the following is the schematic contextual menu: --> Tool --> Generate R/W properties --> Generate R/W Generate R Generate W
It's seems as the famous +- 1 problem: when the caret is between last char of the field's name and the end-decl semicolon, the IDE evaluates the position as outside of the field decl ;-) (obviously exactly that happens if you doubleclick the name to select it).
OK, corrected sharp "more than" to "more or equals" and voila. Fixed in trunk: /cvs/java/src/org/netbeans/modules/java/JavaParserGlue.java,v <-- JavaParserGlue.java new revision: 1.40; previous revision: 1.39
VERIFIED
Reorganization of java component