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 131872

Summary: "create method" hint offer choice of classes (particularly when used from an anonymous class)
Product: java Reporter: fommil <fommil>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description fommil 2008-04-02 21:52:38 UTC
NetBeans 6.1 Beta.

It would be good if the hinter was able to provide a list of valid classes to add a generated method to. For example, in the following code

class EventsView extends Composite {
	public EventsView() {
		MonthView monthly = new MonthView();
		monthly.addDayListener(new DayListener() {
			public void dayChanged(Day day) {
				doStuff(day);
			}
		});
	}
}

Currently the hinter will offer to "create method doStuff in " (yes, it really does cut off the sentence), and if chosen will create the method in the anonymous 
inner class.

However, I am suggesting that the list of options be expanded to

- create method doStuff in anonymous class
- create method doStuff in EventsView
- create method doStuff in Composite

note that in this, the sentence does not cut off for anonymous classes.
Comment 1 Jan Becicka 2008-05-15 13:25:33 UTC
Max volunteered :)