Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames2002-05-06 18:48:42 +0000
committerjames2002-05-06 18:48:42 +0000
commit4a8bba1bf21a0eedf12d486ae307a95708d1c32e (patch)
tree95f164d4cb99710148d89031ecc226728b9c717e
parentbba87026fed70f2b74e02a6f54a4a0ad69ab8acb (diff)
downloadeclipse.platform.team-4a8bba1bf21a0eedf12d486ae307a95708d1c32e.tar.gz
eclipse.platform.team-4a8bba1bf21a0eedf12d486ae307a95708d1c32e.tar.xz
eclipse.platform.team-4a8bba1bf21a0eedf12d486ae307a95708d1c32e.zip
13044: Should have isIgnored(IResource) to cover derived and global pattern
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java
index 40cd9c484..01b53e022 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/Team.java
@@ -118,9 +118,15 @@ public final class Team {
}
/**
- * Returns whether the given file is ignored by any of the global ignore patterns.
+ * Returns whether the given file 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 file the file
+ * @return whether the file should be ignored
*/
- public static boolean isIgnored(IFile file) {
+ public static boolean isIgnoredHint(IFile file) {
IIgnoreInfo[] ignorePatterns = getAllIgnores();
StringMatcher matcher;
for (int i = 0; i < ignorePatterns.length; i++) {
@@ -130,6 +136,7 @@ public final class Team {
if (matcher.match(file.getName())) return true;
}
}
+ if (file.isDerived()) return true;
return false;
}

Back to the top