Bug 469411 - [type wizards] Remove interface from list box if added class implements it
Summary: [type wizards] Remove interface from list box if added class implements it
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-04 11:39 EDT by Steven Spungin CLA
Modified: 2015-06-05 11:12 EDT (History)
1 user (show)

See Also:


Attachments
screenshot (52.96 KB, image/png)
2015-06-04 11:39 EDT, Steven Spungin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.