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.

Bug 32148 - Create Method suggestion enhancements
Summary: Create Method suggestion enhancements
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-19 15:50 UTC by Torbjorn Norbye
Modified: 2016-07-07 07:28 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2003-03-19 15:50:54 UTC
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)
Comment 1 jrose 2009-01-10 00:01:32 UTC
+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.
Comment 2 Martin Balin 2016-07-07 07:28:47 UTC
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