summaryrefslogtreecommitdiff
path: root/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java')
-rw-r--r--plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java
index 3877a78a0d35..eb30dd74752c 100644
--- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java
+++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/ui/experts/importToCvs/ImportTree.java
@@ -30,9 +30,8 @@ import com.intellij.openapi.fileChooser.FileElement;
import com.intellij.openapi.fileChooser.FileSystemTree;
import com.intellij.openapi.fileTypes.FileTypeManager;
import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ProjectFileIndex;
-import com.intellij.openapi.roots.ProjectRootManager;
import com.intellij.openapi.util.IconLoader;
+import com.intellij.openapi.vcs.ProjectLevelVcsManager;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
@@ -150,12 +149,11 @@ public class ImportTree extends NodeRenderer {
if (myProject == null) {
return;
}
- final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex();
- if (!fileIndex.isExcluded(selectedFile)) {
+ if (!isIgnoredByVcs(selectedFile)) {
return;
}
final VirtualFile parent = selectedFile.getParent();
- if (parent != null && fileIndex.isExcluded(parent)) {
+ if (parent != null && isIgnoredByVcs(parent)) {
return;
}
for (final VirtualFile excludedFile : myExcludedFiles) {
@@ -182,12 +180,11 @@ public class ImportTree extends NodeRenderer {
if (myProject == null) {
continue;
}
- final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(myProject).getFileIndex();
- if (!fileIndex.isExcluded(selectedFile)) {
+ if (!isIgnoredByVcs(selectedFile)) {
continue;
}
final VirtualFile parent = selectedFile.getParent();
- if (parent == null || fileIndex.isExcluded(parent) || myExcludedFiles.contains(parent)) {
+ if (parent == null || isIgnoredByVcs(parent) || myExcludedFiles.contains(parent)) {
continue;
}
if (!myIncludedFiles.contains(selectedFile)) {
@@ -211,7 +208,7 @@ public class ImportTree extends NodeRenderer {
return true;
}
}
- if (myProject == null || !ProjectRootManager.getInstance(myProject).getFileIndex().isExcluded(file)) {
+ if (myProject == null || !isIgnoredByVcs(file)) {
return false;
}
for (VirtualFile includedFile : myIncludedFiles) {
@@ -242,7 +239,7 @@ public class ImportTree extends NodeRenderer {
if (FileTypeManager.getInstance().isFileIgnored(abstractFileObject.getName())) return true;
if (myProject != null && !includedFiles.contains(file)) {
final VirtualFile vFile = LocalFileSystem.getInstance().findFileByIoFile(file);
- if (vFile != null && ProjectRootManager.getInstance(myProject).getFileIndex().isExcluded(vFile)) {
+ if (vFile != null && isIgnoredByVcs(vFile)) {
return true;
}
}
@@ -257,4 +254,8 @@ public class ImportTree extends NodeRenderer {
}
};
}
+
+ private boolean isIgnoredByVcs(VirtualFile vFile) {
+ return myProject != null && ProjectLevelVcsManager.getInstance(myProject).isIgnored(vFile);
+ }
}