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.
We now have the cool new editor features with opening and closing parenthesis. There's one thing that drives me nuts, and could be fixed to really make the functionality perfect: Often I am typing something like: int a = getA() The problem is, I get the completion, but I still have to lift my hand off the keyboard and press the right arrow button to go to the end of the line to enter the ;. It kills half of the convenience of this feature. But thinking about it, all you'd have to do is make typing a ; when the character after the caret is ), and it would work perfectly and intuitively. The only place I can think of where it is common to mix ;'s and ) in mid line is for-next loop declarations. And it's an extremely rare use case to enter for (int i=0; i++;;) or something like that...I wouldn't worry about it, but if you wanted to, you just have to scan the current line for " for " preceding the caret - not a lot of work. Any chance we could do this for 3.6?
Changing status to defect - I find I am still typing )'s even though they are inserted by the editor for me - because I have to get to the end of the line to type the ;. That defeats half the usefulness of the editor inserting () for me.
BTW when looking at another issue I noticed that our Java syntax support has a method specifically for determining if a ; belongs to a for loop, so detecting that should be trivial.
We will try to fix it to NB 3.6
Fixed in [maintrunk]. /cvs/editor/src/org/netbeans/modules/editor/java/BracketCompletion.java,v <-- BracketCompletion.java new revision: 1.9; previous revision: 1.8 done
Is there any UI specification describing this feature ? How should it works in other cases ? int a = getMyObject().getA() I have a suggestion : It should works in conjuction with "Start New Line" feature. ( see http://ui.netbeans.org/docs/hi/promoB/2xEnter.html ) int a = getA(|) // shift+Enter should add the ";" at end of line and move caret to next line (on condition that the ";" is not pressent)
Well, please don't remove the feature! It is quite useful! (Now I just have to retrain my fingers to not type )'s over the )'s that were inserted for me so I can put in the ;...)
Verified