public boolean isLibraryClassFile(@NotNull VirtualFile file) { if (file.isDirectory()) return false; if (myFileTypeRegistry.isFileIgnored(file)) return false; VirtualFile parent = file.getParent(); DirectoryInfo parentInfo = getInfoForDirectory(parent); return parentInfo != null && parentInfo.libraryClassRoot != null; }
public boolean isIgnored(@NotNull VirtualFile file) { if (myFileTypeRegistry.isFileIgnored(file)) return true; if (myFileExclusionManager != null && myFileExclusionManager.isExcluded(file)) return true; VirtualFile dir = file.isDirectory() ? file : file.getParent(); if (dir == null) return false; DirectoryInfo info = getInfoForDirectory(dir); if (info != null) return false; if (myDirectoryIndex.isProjectExcludeRoot(dir)) return true; VirtualFile parent = dir.getParent(); while (true) { if (parent == null) return false; DirectoryInfo parentInfo = getInfoForDirectory(parent); if (parentInfo != null) return true; if (myDirectoryIndex.isProjectExcludeRoot(parent)) return true; parent = parent.getParent(); } }
public boolean isContentSourceFile(@NotNull VirtualFile file) { return !file.isDirectory() && !myFileTypeRegistry.isFileIgnored(file) && isInSourceContent(file); }