[tasklist] improvements to the create method suggestion

"Mike Skells" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.tasklist.devel
Message-ID <000401c2ee0d$7889d680$9500a8c0@mikework>
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)
 
Finally a couple of minor bugs!
B1 if the generated code is too wide to fit on the page then it is not
readable, and the accept/fix buttons are not visible!
B2 the action is not checking that the fix option is selected. If you
close the window or press escape the action is taken
 
Mike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.