title: Enterprise Architect Java Code Generation File import
body: <p>I am trying to generate Java code from EA UML Class Diagram. I define two classes and they have a Composition Relation ship. </p>
  
  <p>say, class A contains a List of class B.</p>
  
  <p>I am able to set the default collection class to List in the Code Generation Dialog Box and it correctly generates the code as:</p>
  
  <pre><code>class B {
   public List&lt;B&gt; m_B;
  };
  </code></pre>
  
  <p>But i am not able to get to generate the import statement automatically. like below:</p>
  
  <pre><code>import java.util.List;
  class B {
   public List&lt;B&gt; m_B;
  };
  </code></pre>
  
  <p>I know there is a section in the Code Generation Dialog Box where i can specify the complete import statement, but i have many classes and i would like EA to automatically generate the import statements.</p>
  
  <p>I fiddled with the Code Templates also but i could not get it to import anything other than hard coded import statements in the Code Templates.</p>
  
  <p>the macros</p>
  
  <pre><code>importPackagePath
  importClassName
  </code></pre>
  
  <p>seem to be empty.</p>
  
  <p>Can anyone help me to modify the code template to figure out the imports to be done?</p>
  
  <p>Thanks,</p>
  
  <p>Regards,</p>
  
  <p>Vimal</p>