Summary: | [type wizards] Also fill in interface and super class from text selection | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Philipp <kitschen> |
Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
Status: | ASSIGNED --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | daniel_megert, deepakazad, Olivier_Thomann, remy.suen |
Version: | 3.7 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Philipp
2011-07-22 08:49:07 EDT
Move to JDT/UI Note that there is already a quick fix if one of your classes declares to implement the interface, e.g. "class MyClass implements Iterator {}". Adding a quick assist on just the type seems overkill. Maybe we could do better in initializing the class wizard when an interface is selected. IMHO the hassle of creating a new class is too high. My typical usage is: 1. choose package in package explorer 2. right mouse click, choose New, choose Class 3. fill-out all fields and finish Especially the mouse using parts (1. and 2.) are a pain. Note this made curious, and I realized that the new class wizard can be called using a keyboard shortcut, and there the package is already filled correctly. nice!. So I agree with Dani: just pre-filling out the fields of the new class wizard will do. - add the interface if one was selected when the wizard was started - add a default unique class name if an interface was selected - add a super class if a Class was selected when the wizard was started (and the super class is not final) (In reply to comment #3) > So I agree with Dani: just pre-filling out the fields of the new class wizard > will do. > - add the interface if one was selected when the wizard was started > - add a default unique class name if an interface was selected > - add a super class if a Class was selected when the wizard was started (and > the super class is not final) I think pre-filling interface and/or super class info could quickly get annoying. Current behavior with pre-filling of package field in New Class Wizard - Selection in Java editor - Parent package of the current CU is chosen - Selection in PE - The selected package or the parent package of the selected IJavaElement is chosen - Now if an interface (or a type) is open in Java editor and you open the New Class Wizard - do you *always* want to implement the interface (or extend the type) opened in the editor? - Does the pre-filling happen only when the selection is in Package Explorer? Given that there could be unexpected results for a user, and an alternative efficient workflow exists (quick fox from comment 2). I would close this as WONTFIX. Dani, thoughts? > Dani, thoughts?
We already fill in the interface or super class if such an element is in the structured selection. We should simply do the same with text selections.
|