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.
From: Mike Skells <mike.skells@talk21.com> To: dev@tasklist.netbeans.org Subject: improvements to the create method suggestion Date: Wed, 19 Mar 2003 11:48:33 -0000 Hi, I have a few ideas to make this more useful Forgive me if these are already suggested! Consider the code snippet import com.mine.MyType; ... MyType myVar; fred(myVar); ... 1. names of the formal parameters. if the scanner cannot resolve fred, it provides code to be inserted void fred(com.mine.MyType param1). Could the generation please generate the formal parameter as myVar, ie void fred(com.mine.MyType myVar) 2. being aware of the imports. Get the generator to declare the formal parameter type as void fred(MyType myVar). This could be done by either looking at the declaration of myVar and using the same declaration, or by looking at the imports 3. generate the body from a template or a setting. This allows additional user customisation 4. placement of the new method. Have an option somewhere that allows the generated code to be placed need to the code that called it. 5. some options for the generated code, so that the default can be to generate protected or private method (IMHO should be the default) 6. Allow for the generated code to be placed in other files. This could be in a parent class and /or abstract 7. make the text area editable (and scrollable - see B1) so that the generated code can be customised. Perhaps this window could also have some chooser to allow the placement of the code for (4), and allow for the generated code to be placed in other files (in parent classes)
+1 on point #4, placement of inserted method. Suggested convention: The inserted method should be followed by a comment like this: // NB: Insert new methods before this mark. If the mark already exists, then it is respected. It's obvious to the user that moving the mark will affect the insertion of the next method.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss