Bug 67436 - [code style] new option to prefer type qualified types
Summary: [code style] new option to prefer type qualified types
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-16 08:36 EDT by Neil Swingler CLA
Modified: 2009-01-23 11:32 EST (History)
0 users

See Also:


Attachments

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