use of com.intellij.openapi.fileTypes.FileTypeManager in project intellij-community by JetBrains.
the class CommonRefactoringUtil method collectReadOnlyFiles.
public static void collectReadOnlyFiles(@NotNull VirtualFile vFile, @NotNull final Collection<VirtualFile> list) {
final FileTypeManager fileTypeManager = FileTypeManager.getInstance();
VfsUtilCore.visitChildrenRecursively(vFile, new VirtualFileVisitor(VirtualFileVisitor.NO_FOLLOW_SYMLINKS) {
@Override
public boolean visitFile(@NotNull VirtualFile file) {
final boolean ignored = fileTypeManager.isFileIgnored(file);
if (!file.isWritable() && !ignored) {
list.add(file);
}
return !ignored;
}
});
}
Aggregations