### Eclipse Workspace Patch 1.0 #P org.eclipse.team.core Index: src/org/eclipse/team/core/Team.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.team.core/src/org/eclipse/team/core/Team.java,v retrieving revision 1.64 diff -u -r1.64 Team.java --- src/org/eclipse/team/core/Team.java 16 Mar 2007 21:03:39 -0000 1.64 +++ src/org/eclipse/team/core/Team.java 28 Jun 2007 16:17:37 -0000 @@ -88,12 +88,12 @@ } /** - * Returns whether the given file should be ignored. + * Returns whether the given file or folder with its content should be ignored. * * This method answers true if the file matches one of the global ignore * patterns, or if the file is marked as derived. * - * @param resource the file + * @param resource the file or folder * @return whether the file should be ignored */ public static boolean isIgnoredHint(IResource resource) { @@ -113,7 +113,11 @@ private static boolean matchesEnabledIgnore(IResource resource) { StringMatcher[] matchers = getStringMatchers(); for (int i = 0; i < matchers.length; i++) { - if (matchers[i].match(resource.getName())) return true; + String resourceName = resource.getName(); + if(matchers[i].isPathPattern()) { + resourceName = resource.getFullPath().toString(); + } + if (matchers[i].match(resourceName)) return true; } return false; } Index: src/org/eclipse/team/internal/core/StringMatcher.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.team.core/src/org/eclipse/team/internal/core/StringMatcher.java,v retrieving revision 1.9 diff -u -r1.9 StringMatcher.java --- src/org/eclipse/team/internal/core/StringMatcher.java 5 Jul 2006 14:57:40 -0000 1.9 +++ src/org/eclipse/team/internal/core/StringMatcher.java 28 Jun 2007 16:17:37 -0000 @@ -29,6 +29,7 @@ /* boundary value beyond which we don't need to search in the text */ protected int fBound = 0; + private boolean pathPattern; protected static final char fSingleWildCard = '\u0000'; @@ -126,6 +127,8 @@ fIgnoreWildCards = ignoreWildCards; fLength = aPattern.length(); + pathPattern = aPattern.indexOf('/') != -1; + /* convert case */ if (fIgnoreCase) { fPattern = aPattern.toUpperCase(); @@ -224,6 +227,15 @@ public boolean match(String text) { return match(text, 0, text.length()); } + + /** + * check existence of '/' in the pattern. + * @return true if pattern contains '/' + */ + public boolean isPathPattern() { + return pathPattern; + } + /** * This method parses the given pattern into segments seperated by wildcard '*' characters. * Since wildcards are not being used in this case, the pattern consists of a single segment.