0

I'm using Netbeans 9.0 for developing Java applications.

If use the "Fix-Code" functionality (Alt + Enter) for creating missing methods, netbeans creates the new method in my case every time at the top of the class file (even before the declarations of the variables).

Is there a way to change the placement of new generated methods (e.g. behind the currently edited method)?

EDIT

@skomisa: Here is a animated GIF which demonstrate this effect. But I found yesterday also other files where new methods was placed to the end of the file.

enter image description here

Steffen
  • 2,500
  • 4
  • 31
  • 47
  • I can't reproduce your problem; NetBeans is placing the missing methods at the end of the class file. Could you provide a simple scenario that results in this problem? (See [_How to create a Minimal, Complete, and Verifiable example_](https://stackoverflow.com/help/mcve).) – skomisa Dec 01 '18 at 04:34
  • Well your animated GIF certainly demonstrates the problem you are experiencing, but your code is not a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve). Can you reproduce the problem with a simpler class that just extends or implements some JDK class, and provide the code for that? I have already tried that approach, but for me NetBeans is always adding the generated code at the end of the class. – skomisa Dec 02 '18 at 02:18

0 Answers0