List of usage examples for org.eclipse.jgit.ignore.internal PathMatcher createPathMatcher
public static IMatcher createPathMatcher(String pattern, Character pathSeparator, boolean dirOnly) throws InvalidPatternException
From source file:org.springsource.ide.eclipse.commons.quicksearch.core.pathmatch.ResourceMatchers.java
License:Open Source License
private static ResourceMatcher path(String path) { try {// ww w .j ava 2 s. co m IMatcher matcher = PathMatcher.createPathMatcher(path, '/', false); return new ResourceMatcher() { @Override public String toString() { return path; } @Override public boolean matches(IResource resource) { return matcher.matches(resource.getFullPath().toString(), resource.getType() == IResource.FOLDER, false); } }; } catch (InvalidPatternException e) { return ANY; } }
From source file:svnserver.repository.git.path.matcher.name.ComplexMatcher.java
License:GNU General Public License
public ComplexMatcher(@NotNull String pattern, boolean dirOnly, boolean svnMask) throws InvalidPatternException { this.pattern = pattern; this.dirOnly = dirOnly; this.svnMask = svnMask; this.matcher = PathMatcher.createPathMatcher(dirOnly ? pattern.substring(0, pattern.length() - 1) : pattern, null, dirOnly);//from w w w .j a v a 2 s . co m }