title: How to create an Eclipse folder resource filter in Java
body: <p>The Eclipse folder properties dialog allows you to edit the resource filters ( see <a href="https://stackoverflow.com/questions/2766435/eclipse-3-5-filter-git-folder">eclipse 3.5 filter .git folder</a>) . I would like to do the same programmatically. My current solution is to use internal code as shown below to include only file that match 'xml'. Does anyone know how to do this without the use of internal code?</p>
  
  <p>Thanks in advance</p>
  
  <pre><code>folder.createFilter(
      IResourceFilterDescription.FILES | IResourceFilterDescription.INCLUDE_ONLY,
          new FileInfoMatcherDescription("NameofFolder",  
              "1.0-name-matches-false-false-xml"), 0, null);
  </code></pre>