Bug 67436

Summary: [code style] new option to prefer type qualified types
Product: [Eclipse Project] JDT Reporter: Neil Swingler <neil>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Neil Swingler CLA 2004-06-16 08:36:08 EDT
say I have

public class Property
{
  public static class Def
  {
  }
}

when I do code completion on Def, I want the option to produce

----
import com.package.Property

Property.Def def = new Property.Def(......
----

not

----
import com.package.Property.Def

Def def = new Def(......
----

The rational for this request is that when I create public nested classes I
often give them short names which only make sense within the context of the
parent class. So whilst Property may be a unique classname in my codebase, Def
will not.
Comment 1 johan romme CLA 2004-10-14 05:38:14 EDT
in the example below 'organize imports' generates:

import com.package.Property
import com.package.Property.Def

and the default style checker complains that the 2nd import is not used.
Comment 2 Martin Aeschlimann CLA 2004-10-14 09:37:28 EDT
can you attach the source where organize import adds too many imports?
Comment 3 Martin Aeschlimann CLA 2005-05-17 04:31:01 EDT
not for 3.1