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 should probably consider having an alternate icon for the local variables in the completion window.
Target milestone -> 3.3
Changing the state of the issue to ASSIGNED, because it was cover in Requirements document at http://editor.netbeans.org/doc/Requirements.html
Target milestone -> 3.3.1.
Set target milestone to TBD
See similar issue: http://www.netbeans.org/issues/show_bug.cgi?id=27755
Changing subcomponent to "code completion"
*** Issue 18888 has been marked as a duplicate of this issue. ***
Here are the extracts from other issues, filed for this functionality. IMHO this is a high-priority issue, given the number of requests, and the bad impact it does on NetBeans users: it urges them to write bad code (see the last comment by Riyad Kalla) And please, someone, evaluate this issue and change the Target Milestone to something not TBD (which means "the issue hasn't been evaluated yet"). ---------------------------------------------------------------- Autocomplete should be worked also for local variables. Example public void moin (int indexOfTestTableModel) { int workIndex; ..... } The variables 'indexOfTestTableModel' and 'workIndex' should be detected. Also private members should be shown, if I have access to them. // by Thomas Breitkreuz // ------------------------------------------------- Copy from Issue 38947: Reporter: rsk@netbeans.org (Riyad Kalla) I would like to request that autocompletion for local variables be added to the IDE. I am not aware of ANY IDE that does NOT let you complete local variables except for NetBeans. I'm not sure how the lack of this has lasted so long except for the fact that people might just be used to it. Also, CTRL-L/K doesn't count, that's more of a Emacs text-complete feature than it is an IDE feature. Can someone shed some light as to why this doesn't exist and how its gone so long without being implemented? I see the roadmap for 3.6 and 4.0, and while I see a lot of IDE features, I don't see almost any editing-specific features which is 90% of the work a person does with an IDE. // by Riyad Kalla // -------------------------------------------------------- May I request a review of this rather useful and fundamental coding-productivity functionality, please, why it's not there, and how Java-MDR (in 4.0) may solve this issue? // upon request by Sergey Kholobuda in nbdiscuss_ru@netbeans.org // -------------------------------------------------------- I imagine the lack of this functionality stems from short commings in the autocomplete parser. Autocomplete accuracy, delay and intelligence in NetBeans 3.5.1 acts like a proof of concept when compared to the likes of Eclipse 3.x (and 2.x sort of) or IntelliJ 3.x/4.x. // by Riyad Kalla // --------------------------------------------------------- As a side note, I was working with a new developer this morning who uses NetBeans exclusively... and ever single one of his method-scope variables were 2 to 3 letter abbreviations. So it seems the lack of this feature really does effect how these developers are coding. // by Riyad Kalla //
I think that this should rather be marked as a defect than an enhancement. We should be able to address the problem into promoD. One particular problem is accuracy of the parser for local variables - currently it only searches for the two successive identifiers followed by semicolon (or assignment or comma). It searches from the method body opening brace but it does not watch for code blocks nesting so in fact "innerVar" variable would get displayed at the caret position in the following example: void m1() { ... { int innerVar; ... } ... | } Right now we are in the process of adapting the editor to new java/mdr into promoD so rewriting portions of the completion against JMI interfaces and other related changes are being done as well. We will attempt to address this issue during this rewrite as well.
Miloslav, Thank you for the update... is this rewrite planned for NetBeans 4? Or is this for a later release? I also agree with your assessment that it is a defect. Perhaps an enhancement in when it was opened, but certainly a defect now.
The java/mdr based code completion must certainly get ready into promoD and the fix for this should be included. BTW the development is done under meta_stavbicka cvs branch which should get merged into the trunk soon. Assigning to Martin.
*** Issue 43500 has been marked as a duplicate of this issue. ***
Fixed in [maintrunk]. The new jmi/mdr based code completion shows local variables in the completion window.
Verified in 200412221900.