summaryrefslogtreecommitdiff
path: root/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java')
-rw-r--r--platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java b/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java
index b06cf065fd95..17a7abc2a694 100644
--- a/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java
+++ b/platform/projectModel-api/src/com/intellij/openapi/roots/ProjectFileIndex.java
@@ -131,6 +131,7 @@ public interface ProjectFileIndex extends FileIndex {
/**
* @deprecated name of this method may be confusing. If you want to check if the file is excluded or ignored use {@link #isExcluded(com.intellij.openapi.vfs.VirtualFile)}.
* If you want to check if the file is ignored use {@link com.intellij.openapi.fileTypes.FileTypeRegistry#isFileIgnored(com.intellij.openapi.vfs.VirtualFile)}.
+ * If you want to check if the file or one of its parents is ignored use {@link #isUnderIgnored(com.intellij.openapi.vfs.VirtualFile)}.
*/
@Deprecated
boolean isIgnored(@NotNull VirtualFile file);
@@ -143,4 +144,13 @@ public interface ProjectFileIndex extends FileIndex {
* @return true if <code>file</code> is excluded or ignored, false otherwise.
*/
boolean isExcluded(@NotNull VirtualFile file);
+
+ /**
+ * Checks if the specified file or directory is located under project roots but the file itself or one of its parent directories is ignored
+ * by {@link com.intellij.openapi.fileTypes.FileTypeRegistry#isFileIgnored(com.intellij.openapi.vfs.VirtualFile)}).
+ *
+ * @param file the file to check.
+ * @return true if <code>file</code> is ignored, false otherwise.
+ */
+ boolean isUnderIgnored(@NotNull VirtualFile file);
}