org.eclipse.xtext.mwe
Class NameBasedFilter

java.lang.Object
  extended by org.eclipse.xtext.mwe.NameBasedFilter
All Implemented Interfaces:
UriFilter

public class NameBasedFilter
extends java.lang.Object
implements UriFilter

Author:
Sebastian Zarnekow - Initial contribution and API

Constructor Summary
NameBasedFilter()
           
 
Method Summary
 java.lang.String getExtension()
           
 java.util.regex.Pattern getRegularExpression()
           
 boolean matches(org.eclipse.emf.common.util.URI uri)
           
 void setExtension(java.lang.String extension)
          Filter based on the URI-attribute 'fileExtension'.
 void setRegularExpression(java.lang.String regularExpression)
          Filter the URI based on a regular expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameBasedFilter

public NameBasedFilter()
Method Detail

matches

public boolean matches(org.eclipse.emf.common.util.URI uri)
Specified by:
matches in interface UriFilter

setExtension

public void setExtension(java.lang.String extension)
Filter based on the URI-attribute 'fileExtension'. The filter is applied ignore-case. Can be combined with an additional regular expression.


getExtension

public java.lang.String getExtension()

setRegularExpression

public void setRegularExpression(java.lang.String regularExpression)
Filter the URI based on a regular expression. Can be combined with an additional file-extension filter.


getRegularExpression

public java.util.regex.Pattern getRegularExpression()