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.
Build 200411150946 (pre-RC1) 1) Have multine method call and invoke CC at position '|': TestCall(| 100000); 2) ERROR: parameter name from method definition will be completed: TestCall(index) 100000); I would expect only JavaDoc window opening.
The problem is that instant substitution for the code completion is not evaluating the context properly and it thinks that there are no parameters filled in although there are some. The instant substitution needs to work lexically instead of just evaluating whether there are any characters till the end of the line. The workaround can be to swith-off the "Code Completion Instant Substitution" in Tools->Options->Editing->Editor Settings->Java Editor.
*** Issue 52092 has been marked as a duplicate of this issue. ***
Can we fix this issue in 4.1? It has 4 votes. If not, remove the status whiteboard I've added. Thanks.
For the next release, we plan to redesign the method parameters code completion so the method parameter names are no longer pasted directly to the text but they are shown in a tooltip instead. This change should fix this issue.
As a long time NetBeans user, I would like to comment on your plans to stop pasting method parameter names into the source and show them in a tool tip. I happen to feel the pasting of the parameter names are a great advantage. I use long and meaningful parameter names like "customerId" or "paymentDate" and quite often there is a perfect match between the local variable name and the invoked method's parameter name, so when NetBeans pastes "customerID" I do not change this name - rather I hit my left arrow key to accept the name NetBeans has pasted for me. This is a very efficient way to invoke methods. I strongly feel that the change you suggest will remove this efficient way of typing parameter names. Of course, I do not know the details of your plan, but I hope you will take this comment into account. Randahl
Pasting comments from nbusers: ----------------%<------------------ Prior to the latest qbuild NB would show the parameters of a method in the Ctrl+Space list, and this has now been moved to Alt+p. I appreciate the new way being much faster, but I miss one important feature: NB used to print a variable name suggestion simply by typing the name of the method parameter, and this feature is now gone it seems. For instance, if the class Car had this constructor public Car(int registrationNumber) {} then when typing new Car(| NB would fill in the default variable name "registrationNumber" - this was great because quite often I had a local variable of exactly that name, so NB saved me a lot of typing. Since this featrue seems to have been lost, I would like to suggest that NB was improved by allowing me to hit Alt+p a second time and get the parameter name typed. I could work this way: 1. I type "new Car(" 2. I press Alt+p and get a tool tip saying "int registrationNumber" with the registrationNumber in bold 3. Knowing that i have a local variable of the same name which I would like to use I press Alt+p A SECOND TIME 4. As a response to the second press NB prints "registrationNumber" for me This could work for methods of more than one parameter as well simply by letting each consecutive press of Alt+p type the next name (seperated by commas of course). How about that? Randahl ----------------%<------------------ even better: when the user types the ';', ')', or ',' characters before typing a letter, you can assume the user simply wants to use the default variable name and fill it in before the typed character. in other words, whenever the user leaves an area which requires a value empty, fill it in with the name from the prototype. ----------------%<------------------ Please consider these suggestions before closing this issue.
With the new code completion infrastructure, parameter names are no longer automatically pasted. Closing as wontfix.