title: Load classes of java project
body: <p>I am loading all the source classes of a selected project using below code,</p>
  
  <pre><code>IPackageFragment[] packages = javaProject.getPackageFragments();
  for (IPackageFragment mypackage : packages) {      
  if (mypackage.getKind() == IPackageFragmentRoot.K_SOURCE) {
      for (ICompilationUnit unit : mypackage.getCompilationUnits()) {
          // code here
      }    
  }
  </code></pre>
  
  <p>However, consider a project having structure below</p>
  
  <p>ProjectName -> src -> main -> org -> odlabs -> wiquery -> core -> JQueryAjaxOption.java</p>
  
  <pre><code>               -&gt; test -&gt; org -&gt; odlabs -&gt; wiquery -&gt; core -&gt; JQueryAjaxOptionTestCase.java
  </code></pre>
  
  <p>Now, the above two classes have same package but located in different folder.</p>
  
  <p>I have two question here</p>
  
  <ol>
  <li>Is it possible that i can exclude test folder in my code above? I check class "IPackageFragmentRoot" but could not find anything...</li>
  <li>Can project conceptually contain two different folders (apart from "test" folder) having classes with same package name? (technically yes it is possible).</li>
  </ol>