Bug 469411

Summary: [type wizards] Remove interface from list box if added class implements it
Product: [Eclipse Project] JDT Reporter: Steven Spungin <steven>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert
Version: 4.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
screenshot none

Description Steven Spungin CLA 2015-06-04 11:39:03 EDT
Created attachment 254113 [details]
screenshot

When adding a class in the new-class wizard, it would be preferable to remove pre-added interfaces in the list that implement an added class.

I find myself constantly having to manually remove the redundant 'implements' declaration from the wizard/generated class.
Comment 1 Dani Megert CLA 2015-06-05 04:49:56 EDT
(In reply to Steven Spungin from comment #0)
> Created attachment 254113 [details]
> screenshot
> 
> When adding a class in the new-class wizard, it would be preferable to
> remove pre-added interfaces in the list that implement an added class.
> 
> I find myself constantly having to manually remove the redundant
> 'implements' declaration from the wizard/generated class.

How does the interface get into the dialog? Do you add it before adding the class or is it pre-filled?
Comment 2 Steven Spungin CLA 2015-06-05 11:03:26 EDT
It is pre filled.
Comment 3 Dani Megert CLA 2015-06-05 11:05:39 EDT
(In reply to Steven Spungin from comment #2)
> It is pre filled.

k, can you give me the scenario? We don't want to remove things if the user explicitly added it, but if we try to be smart we can also go a step further.
Comment 4 Steven Spungin CLA 2015-06-05 11:12:22 EDT
1. MyWidget does not exist.
2. addComponent(new MyWidget());  // void addComponent(IWidget widget);
3. Use context menu or other means to open the 'new class wizard'
4. By default the wizard adds interface IWidget to the list
5. I select AbstractWidgetBase as the superclass in the wizard
6. I delete pre-filled the IWidget interface from the wizard


99% of the time I select an abstract or concrete class that implements IWidget, and I always need to remove it manually.