title: JavaParser doesn't remove comments before package declaration
body: <p>I am writing a Java application that removes comments from Java files.</p>
  
  <p>I wrote this code:</p>
  
  <pre><code>static void removeComments(Node node) {
          for (Comment child : node.getAllContainedComments()) {
              child.remove();
          }
      }
  
  CompilationUnit cu = JavaParser.parse(projectDir); // projectDir is received from parameter
  removeComments(cu);
  </code></pre>
  
  <p>It kind of works. However, if there are block comments before the package declarations, the code won't remove those comments.</p>
  
  <p>For example, this code:</p>
  
  <pre><code>/*
   * Block comment
   */
  // Line comment
  package test;
  
  /*
   * Block comment
   */
  // comment
  /**
   *
   * @author Me
   */
  public class Test {
  
      public static void main(String[] args) {
          // TODO code application logic here
          System.out.println("print 1"); // comment in code line
          // comment 2
          System.out.println("print 2");
          /*
          block comment
           */
      }
  
  }
  </code></pre>
  
  <p>Becomes this code:</p>
  
  <pre><code>/*
   * Block comment
   */
  package test;
  
  public class Test {
  
      public static void main(String[] args) {
          System.out.println("print 1");
          System.out.println("print 2");
      }
  }
  </code></pre>
  
  <p>Is it a bug from JavaParser, or am I missing something?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>If I put a line comment at the beginning of the file, the first block comment (the one before the package declaration) will be removed, but not this line comment. I think JavaParser doesn't consider that the first line of a file may be a comment.</p>