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.
Hi. Netbeans is unable to change the type of the newly created variable from context menu alt+enter. It makes the IDE NOT TDD friendly. Please fix it. Thanks. Best regards.
I'm not really sure what you describe exactly, could you add some more details to the feature request? Some sample start code, the expected menu item and the expected outcome when the item is used? Thanks!
Hello. Thanks for your interest on the issue :-) When working with intellj or eclipse the following use case ins possible. For example i want to write something like this. As an example i provide you a unit test, but it can happen also in the regular method in a ordinary class. @Test public void canSumTwoNumbers() { //below line is new in the test method; before that, the method was empty. calculator.sum(1, 2); } Please bare in mind, i do not have a calculator class available yet. So we have a compilation error. I want to fix it automatically. So i am pressing alt+enter shortcut. A popup appears. I can create local variable. Ok, i select that. A new variable is then created, but automatically Object type is assigned. Ok, but it is something that is not editable out of the box. Then i have something like bellow. @Test public void canSumTwoNumbers() { Object calculator; calculator.sum(1, 2); } But the Object type is not editable. I have to erase with backspace or del keys. In intellij or eclipse you have the possibility to type in a type. Then i would like to type Calculator (a name of a class), which does not exists yet. Obviously i will have compilation error, but that is fine. Further, putting the cursor in the Calculator type, that i have just written, pressing alt+enter i have a fix, where i can create a Calculator class. And that is it. The same situation happens when i work with a fields. Not type editing is possible. A good reference point could be the intellij idea IDE. Community edition has the same refactoring possibilities then ultimate version. If you have trouble with reproducing the steps or doubt about what i have explained, please let me know. I am keen on helping to make the Netbeans a better IDE :-) Regards. Cheers.