Re: [tasklist] improvements to the create method suggestion
Tor Norbye <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.tasklist.devel |
|---|---|
| Organization | Sun Microsystems, Inc |
| Message-ID | <1048089299.18663.95.camel@proto> |
Thanks! I've filed issue 32148 for the enhancements and issue 32149 for the bugs. -- Tor On Wed, 2003-03-19 at 03:48, Mike Skells wrote: > 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 -- Tor Norbye <[email protected]> Sun Microsystems, Inc