title: Import not used over inherited nested class
body: <p>My problem is quite simple: I want to use a class named <code>Type</code> (really <code>org.eclipse.uml2.uml.Type</code> in a Swing <code>JDialog</code>.</p>
  
  <p>My code is (excerpt) :</p>
  
  <pre><code>import org.eclipse.uml2.uml.Type;
  
  public class MyDialog extends JDialog {
  
      private List&lt;Type&gt; myTypes;
  </code></pre>
  
  <p>Problem is this does not work as expected. Eclipse tells me that the <code>Type</code> class mentioned in the <code>myTypes</code> declaration is really <code>Window.Type</code>, and my further code that uses this variable does not compile. I see that <code>JDialog</code> extends <code>Dialog</code> extends <code>Window</code> which contains a nested <code>Type</code> enum.</p>
  
  <p>What surprises me is that, for instance when I want to use the <code>Class</code> class from uml package, I just import this <code>Class</code> class and the compiler is able to understand I want to use the Class in this import and not the <code>Class</code> class it would pick without the import (java.lang one). So it bugs me this does not work here, and I am obliged to use qualified name in all my code.</p>
  
  <p>What further surprises me is that, according to the doc, this <code>Window.Type</code> enum was added in java 7, which means any code similar to mine would have worked until java 6 and suddenly stopped working in java 7, so a breaking change...</p>
  
  <p>I use Java 8 and Eclipse Oxygen.</p>
  
  <p>Is there something I miss? A compiler option or something? Is this expected and I have to live with it?</p>