ExcludedFileIndex -> FileIndexFacade; use it in PsiClassImplUtil
authorDmitry Jemerov <yole@jetbrains.com>
Thu, 22 Sep 2011 15:31:05 +0000 (17:31 +0200)
committerDmitry Jemerov <yole@jetbrains.com>
Thu, 22 Sep 2011 17:31:29 +0000 (19:31 +0200)
23 files changed:
java/java-impl/src/com/intellij/psi/ClassFileViewProvider.java
java/java-impl/src/com/intellij/psi/impl/ElementPresentationUtil.java
java/java-impl/src/com/intellij/psi/impl/PsiClassImplUtil.java
platform/core-api/src/com/intellij/openapi/roots/FileIndexFacade.java [moved from platform/core-api/src/com/intellij/openapi/roots/ExcludedFileIndex.java with 93% similarity]
platform/core-impl/src/com/intellij/psi/impl/PsiManagerImpl.java
platform/core-impl/src/com/intellij/psi/impl/file/impl/FileManagerImpl.java
platform/lang-impl/src/com/intellij/openapi/vcs/impl/ModuleDefaultVcsRootPolicy.java
platform/lang-impl/src/com/intellij/openapi/vcs/impl/ProjectFileIndexFacade.java [moved from platform/lang-impl/src/com/intellij/openapi/vcs/impl/ProjectExcludedFileIndex.java with 88% similarity]
platform/platform-resources/src/META-INF/PlatformLangPlugin.xml
platform/platform-resources/src/META-INF/PlatformPlugin.xml
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/CommonCheckinFilesAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LocalChangeListImpl.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UpdatingChangeListBuilder.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/VcsGuess.java
platform/vcs-impl/src/com/intellij/openapi/vcs/impl/DefaultFileIndexFacade.java [moved from platform/vcs-impl/src/com/intellij/openapi/vcs/impl/DefaultExcludedFileIndex.java with 90% similarity]
platform/vcs-impl/src/com/intellij/openapi/vcs/impl/ProjectLevelVcsManagerImpl.java
platform/vcs-impl/src/com/intellij/openapi/vcs/impl/VcsRootIterator.java
platform/vcs-impl/src/com/intellij/openapi/vcs/impl/projectlevelman/MappingsToRoots.java
plugins/svn4idea/src/org/jetbrains/idea/svn/StatusWalkerPartnerImpl.java
plugins/svn4idea/src/org/jetbrains/idea/svn/actions/SvnExcludingIgnoredOperation.java
plugins/svn4idea/src/org/jetbrains/idea/svn/checkout/SvnCheckoutProvider.java
plugins/svn4idea/src/org/jetbrains/idea/svn/integrate/IntegratedSelectedOptionsDialog.java
resources/src/idea/RichPlatformPlugin.xml

index bddd8c2f6333b6c741f16eb3ff59f6b5e4324f53..a1eba54dbb0dc7b5983a43459e1aa64f97256497 100644 (file)
@@ -22,7 +22,7 @@ package com.intellij.psi;
 import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.impl.PsiManagerImpl;
 import com.intellij.psi.impl.compiled.ClsFileImpl;
@@ -39,7 +39,7 @@ public class ClassFileViewProvider extends SingleRootFileViewProvider {
 
   @Override
   protected PsiFile createFile(final Project project, final VirtualFile vFile, final FileType fileType) {
-    final ExcludedFileIndex fileIndex = ServiceManager.getService(project, ExcludedFileIndex.class);
+    final FileIndexFacade fileIndex = ServiceManager.getService(project, FileIndexFacade.class);
     if (fileIndex.isInLibraryClasses(vFile) || !fileIndex.isInSource(vFile)) {
       String name = vFile.getName();
 
index 9a7d2f41a2186e541be498126bd052ab0a79d2f7..ee7851812eca9b631a2cdf3ce5487414fcd6c496 100644 (file)
@@ -21,7 +21,7 @@ import com.intellij.compiler.CompilerConfiguration;
 import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.project.DumbService;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.util.IconLoader;
 import com.intellij.openapi.util.Iconable;
 import com.intellij.openapi.util.Key;
@@ -95,7 +95,7 @@ public class ElementPresentationUtil implements PlatformIcons {
 
   public static boolean isExcluded(final VirtualFile vFile, final Project project) {
     return vFile != null
-           && ServiceManager.getService(project, ExcludedFileIndex.class).isInSource(vFile)
+           && ServiceManager.getService(project, FileIndexFacade.class).isInSource(vFile)
            && CompilerConfiguration.getInstance(project).isExcludedFromCompilation(vFile);
   }
 
index 17008689fcaf7e19964f8516a5e0072661875106..83d10725d8a5970b9f148cf348590111c7b08955 100644 (file)
  */
 package com.intellij.psi.impl;
 
+import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.progress.ProgressManager;
-import com.intellij.openapi.roots.ProjectFileIndex;
-import com.intellij.openapi.roots.ProjectRootManager;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.util.*;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.*;
@@ -926,7 +926,7 @@ public class PsiClassImplUtil {
       return compareClassSeqNumber(aClass, (PsiClass)another);
     }    
 
-    final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(aClass.getProject()).getFileIndex();
+    final FileIndexFacade fileIndex = ServiceManager.getService(file1.getProject(), FileIndexFacade.class);
     final VirtualFile vfile1 = file1.getViewProvider().getVirtualFile();
     final VirtualFile vfile2 = file2.getViewProvider().getVirtualFile();
     return (fileIndex.isInSource(vfile1) || fileIndex.isInLibraryClasses(vfile1)) &&
similarity index 93%
rename from platform/core-api/src/com/intellij/openapi/roots/ExcludedFileIndex.java
rename to platform/core-api/src/com/intellij/openapi/roots/FileIndexFacade.java
index d5062c118ecbb1242bf26788c7690e937baaab67..9dd197d64789a60d97e30cd16200f397e6fb7c87 100644 (file)
@@ -21,10 +21,10 @@ import com.intellij.openapi.vfs.VirtualFile;
 /**
  * @author yole
  */
-public abstract class ExcludedFileIndex {
+public abstract class FileIndexFacade {
   protected final Project myProject;
 
-  protected ExcludedFileIndex(final Project project) {
+  protected FileIndexFacade(final Project project) {
     myProject = project;
   }
 
index 212120128a128b38712ab511b7245d491b782119..213b8ad2c56f28bf52ef4c70f779665d87e119ea 100644 (file)
@@ -24,7 +24,7 @@ import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.fileEditor.FileDocumentManager;
 import com.intellij.openapi.progress.ProgressIndicatorProvider;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.util.Disposer;
 import com.intellij.openapi.util.Key;
 import com.intellij.openapi.vfs.VirtualFile;
@@ -50,7 +50,7 @@ public class PsiManagerImpl extends PsiManagerEx {
   private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.PsiManagerImpl");
 
   private final Project myProject;
-  private final ExcludedFileIndex myExcludedFileIndex;
+  private final FileIndexFacade myExcludedFileIndex;
   private final MessageBus myMessageBus;
 
   private final FileManager myFileManager;
@@ -72,7 +72,7 @@ public class PsiManagerImpl extends PsiManagerEx {
   public PsiManagerImpl(Project project,
                         FileDocumentManager fileDocumentManager,
                         PsiBuilderFactory psiBuilderFactory,
-                        ExcludedFileIndex excludedFileIndex,
+                        FileIndexFacade excludedFileIndex,
                         MessageBus messageBus) {
     myProject = project;
     myExcludedFileIndex = excludedFileIndex;
index fa5bd91eedbf23556fe494ef8712dba73a76a629..33ddd0891537cfb2da482680bf4ba663958f38c3 100644 (file)
@@ -29,7 +29,7 @@ import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.fileTypes.LanguageFileType;
 import com.intellij.openapi.project.DumbService;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.util.Disposer;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.*;
@@ -56,7 +56,7 @@ public class FileManagerImpl implements FileManager {
   private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.file.impl.FileManagerImpl");
 
   private final PsiManagerImpl myManager;
-  private final ExcludedFileIndex myFileIndex;
+  private final FileIndexFacade myFileIndex;
 
   private final ConcurrentMap<VirtualFile, PsiDirectory> myVFileToPsiDirMap = new ConcurrentSoftValueHashMap<VirtualFile, PsiDirectory>();
   private final ConcurrentWeakValueHashMap<VirtualFile, FileViewProvider> myVFileToViewProviderMap = new ConcurrentWeakValueHashMap<VirtualFile, FileViewProvider>();
@@ -69,7 +69,7 @@ public class FileManagerImpl implements FileManager {
 
   public FileManagerImpl(PsiManagerImpl manager,
                          FileDocumentManager fileDocumentManager,
-                         ExcludedFileIndex fileIndex) {
+                         FileIndexFacade fileIndex) {
     myManager = manager;
     myFileIndex = fileIndex;
     myConnection = manager.getProject().getMessageBus().connect();
index 37ed7075bcd5b290ed98a71379ad27381e28fb8f..c4fb6b7d78430fad4286d91a0f3acc75382886e7 100644 (file)
@@ -24,7 +24,7 @@ import com.intellij.openapi.module.ModuleManager;
 import com.intellij.openapi.module.ModuleUtil;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.project.ex.ProjectEx;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.roots.ModuleRootManager;
 import com.intellij.openapi.roots.ProjectRootManager;
 import com.intellij.openapi.util.Computable;
@@ -110,7 +110,7 @@ public class ModuleDefaultVcsRootPolicy extends DefaultVcsRootPolicy {
 
   @Nullable
   public VirtualFile getVcsRootFor(final VirtualFile file) {
-    if (myBaseDir != null && PeriodicalTasksCloser.getInstance().safeGetService(myProject, ExcludedFileIndex.class)
+    if (myBaseDir != null && PeriodicalTasksCloser.getInstance().safeGetService(myProject, FileIndexFacade.class)
       .isValidAncestor(myBaseDir, file)) {
       return myBaseDir;
     }
similarity index 88%
rename from platform/lang-impl/src/com/intellij/openapi/vcs/impl/ProjectExcludedFileIndex.java
rename to platform/lang-impl/src/com/intellij/openapi/vcs/impl/ProjectFileIndexFacade.java
index 02cfabefa22b4a54476ef993ac8ff5e9c796ed12..74ffe98937957464d53b616056d8c4f2be5efa46 100644 (file)
@@ -17,7 +17,7 @@
 package com.intellij.openapi.vcs.impl;
 
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.roots.ProjectRootManager;
 import com.intellij.openapi.roots.impl.DirectoryIndex;
 import com.intellij.openapi.vfs.VirtualFile;
@@ -25,11 +25,11 @@ import com.intellij.openapi.vfs.VirtualFile;
 /**
  * @author yole
  */
-public class ProjectExcludedFileIndex extends ExcludedFileIndex {
+public class ProjectFileIndexFacade extends FileIndexFacade {
   private final ProjectRootManager myRootManager;
   private final DirectoryIndex myDirectoryIndex;
 
-  public ProjectExcludedFileIndex(final Project project, final ProjectRootManager rootManager, final DirectoryIndex directoryIndex) {
+  public ProjectFileIndexFacade(final Project project, final ProjectRootManager rootManager, final DirectoryIndex directoryIndex) {
     super(project);
     myRootManager = rootManager;
     myDirectoryIndex = directoryIndex;
index e5acb6e073bb1c4dc680bbd2be0c169d88e5e589..6258e16f4476ed77bf57d3fcd835f3e774452604 100644 (file)
@@ -34,8 +34,8 @@
 
     <exportable serviceInterface="com.intellij.openapi.projectRoots.ProjectJdkTable"/>
 
-    <projectService serviceInterface="com.intellij.openapi.roots.ExcludedFileIndex"
-                    serviceImplementation="com.intellij.openapi.vcs.impl.ProjectExcludedFileIndex"/>
+    <projectService serviceInterface="com.intellij.openapi.roots.FileIndexFacade"
+                    serviceImplementation="com.intellij.openapi.vcs.impl.ProjectFileIndexFacade"/>
     <projectService serviceInterface="com.intellij.openapi.vcs.impl.DefaultVcsRootPolicy"
                     serviceImplementation="com.intellij.openapi.vcs.impl.ModuleDefaultVcsRootPolicy"/>
 
index 9339ed13f8fbcf20c2b2eea50d00d403af57c039..38ea712e97ff30704e900f8eb6242e13c873fefc 100644 (file)
@@ -26,8 +26,8 @@
     <applicationService serviceInterface="com.intellij.ui.mac.MacMessages"
                         serviceImplementation="com.intellij.ui.mac.MacMessagesImpl"/>
     
-    <projectService serviceInterface="com.intellij.openapi.roots.ExcludedFileIndex"
-                    serviceImplementation="com.intellij.openapi.vcs.impl.DefaultExcludedFileIndex"/>
+    <projectService serviceInterface="com.intellij.openapi.roots.FileIndexFacade"
+                    serviceImplementation="com.intellij.openapi.vcs.impl.DefaultFileIndexFacade"/>
     <projectService serviceInterface="com.intellij.openapi.vcs.impl.DefaultVcsRootPolicy"
                     serviceImplementation="com.intellij.openapi.vcs.impl.BasicDefaultVcsRootPolicy"/>
 
index 1d5981df03528f28ff480d86019ff31bdacc3e43..22b194bab3b0678117e98925d63adcc99faa8d48 100644 (file)
@@ -18,7 +18,7 @@ package com.intellij.openapi.vcs.actions;
 import com.intellij.lifecycle.PeriodicalTasksCloser;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.roots.ContentIterator;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.roots.impl.FileIndexImplUtil;
 import com.intellij.openapi.util.Ref;
 import com.intellij.openapi.vcs.*;
@@ -75,7 +75,7 @@ public class CommonCheckinFilesAction extends AbstractCommonCheckinAction {
         change.set(changeListManager.getChange(file));
       }
       else {
-        final ExcludedFileIndex index = PeriodicalTasksCloser.getInstance().safeGetService(project, ExcludedFileIndex.class);
+        final FileIndexFacade index = PeriodicalTasksCloser.getInstance().safeGetService(project, FileIndexFacade.class);
         final VirtualFileFilter filter = new VirtualFileFilter() {
           public boolean accept(final VirtualFile file) {
             return (! index.isExcludedFile(file));
index 6f45b5fb40a08382588f31ef926f83767ee2ce5e..654a806ee3f0264a519c0ed8af687f323811d72d 100644 (file)
@@ -4,7 +4,7 @@ package com.intellij.openapi.vcs.changes;
 import com.intellij.lifecycle.PeriodicalTasksCloser;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.util.Comparing;
 import com.intellij.openapi.vcs.history.VcsRevisionNumber;
 import com.intellij.openapi.vfs.VirtualFile;
@@ -133,7 +133,7 @@ public class LocalChangeListImpl extends LocalChangeList {
     createReadChangesCache();
     final Collection<Change> result = new ArrayList<Change>();
     myChangesBeforeUpdate = new OpenTHashSet<Change>(myChanges);
-    final ExcludedFileIndex fileIndex = PeriodicalTasksCloser.getInstance().safeGetService(project, ExcludedFileIndex.class);
+    final FileIndexFacade fileIndex = PeriodicalTasksCloser.getInstance().safeGetService(project, FileIndexFacade.class);
     for (Change oldBoy : myChangesBeforeUpdate) {
       final ContentRevision before = oldBoy.getBeforeRevision();
       final ContentRevision after = oldBoy.getAfterRevision();
@@ -146,13 +146,13 @@ public class LocalChangeListImpl extends LocalChangeList {
     return result;
   }
 
-  private static boolean isIgnoredChange(final Change change, final ExcludedFileIndex fileIndex) {
+  private static boolean isIgnoredChange(final Change change, final FileIndexFacade fileIndex) {
     boolean beforeRevIgnored = change.getBeforeRevision() == null || isIgnoredRevision(change.getBeforeRevision(), fileIndex);
     boolean afterRevIgnored = change.getAfterRevision() == null || isIgnoredRevision(change.getAfterRevision(), fileIndex);
     return beforeRevIgnored && afterRevIgnored;
   }
 
-  private static boolean isIgnoredRevision(final ContentRevision revision, final ExcludedFileIndex fileIndex) {
+  private static boolean isIgnoredRevision(final ContentRevision revision, final FileIndexFacade fileIndex) {
     VirtualFile vFile = revision.getFile().getVirtualFile();
     return vFile != null && fileIndex.isExcludedFile(vFile);
   }
index bd5bd03df15519fce7d8745318a407ed497034a4..c38fea69b64907e1ba62716aeb1b2f48a1bf8cc8 100644 (file)
@@ -19,7 +19,7 @@ import com.intellij.lifecycle.PeriodicalTasksCloser;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.fileTypes.FileTypeManager;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.util.Getter;
 import com.intellij.openapi.vcs.FilePath;
 import com.intellij.openapi.vcs.FilePathImpl;
@@ -36,7 +36,7 @@ class UpdatingChangeListBuilder implements ChangelistBuilder {
   private VcsDirtyScope myScope;
   private FoldersCutDownWorker myFoldersCutDownWorker;
   private final IgnoredFilesComponent myIgnoredFilesComponent;
-  private final ExcludedFileIndex myIndex;
+  private final FileIndexFacade myIndex;
   private final ChangeListManagerGate myGate;
 
   UpdatingChangeListBuilder(final ChangeListWorker changeListWorker,
@@ -48,7 +48,7 @@ class UpdatingChangeListBuilder implements ChangelistBuilder {
     myDisposedGetter = disposedGetter;
     myIgnoredFilesComponent = ignoredFilesComponent;
     myGate = gate;
-    myIndex = PeriodicalTasksCloser.getInstance().safeGetService(changeListWorker.getProject(), ExcludedFileIndex.class);
+    myIndex = PeriodicalTasksCloser.getInstance().safeGetService(changeListWorker.getProject(), FileIndexFacade.class);
   }
 
   private void checkIfDisposed() {
index 9a16c8bb0fe15268306697296e8b941a974a0662..93bd355171febe7e5def324a473325b2a7a4ce2e 100644 (file)
@@ -20,7 +20,7 @@ import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.StorageScheme;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.project.ex.ProjectEx;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.util.Computable;
 import com.intellij.openapi.vcs.AbstractVcs;
 import com.intellij.openapi.vcs.FilePath;
@@ -32,12 +32,12 @@ import org.jetbrains.annotations.Nullable;
 public class VcsGuess {
   private final Project myProject;
   private final ProjectLevelVcsManagerImpl myVcsManager;
-  private final ExcludedFileIndex myExcludedFileIndex;
+  private final FileIndexFacade myExcludedFileIndex;
 
   VcsGuess(final Project project) {
     myProject = project;
     myVcsManager = (ProjectLevelVcsManagerImpl) ProjectLevelVcsManagerImpl.getInstance(myProject);
-    myExcludedFileIndex = PeriodicalTasksCloser.getInstance().safeGetService(myProject, ExcludedFileIndex.class);
+    myExcludedFileIndex = PeriodicalTasksCloser.getInstance().safeGetService(myProject, FileIndexFacade.class);
   }
 
   @Nullable
similarity index 90%
rename from platform/vcs-impl/src/com/intellij/openapi/vcs/impl/DefaultExcludedFileIndex.java
rename to platform/vcs-impl/src/com/intellij/openapi/vcs/impl/DefaultFileIndexFacade.java
index 776d6cb537476556043efd64240ba7d5d7c841f2..cc12cb416bbe2b5799c102c237c6e8dd7a88f52f 100644 (file)
@@ -16,7 +16,7 @@
 package com.intellij.openapi.vcs.impl;
 
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.vfs.VfsUtil;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.platform.ProjectBaseDirectory;
@@ -24,11 +24,11 @@ import com.intellij.platform.ProjectBaseDirectory;
 /**
  * @author yole
  */
-public class DefaultExcludedFileIndex extends ExcludedFileIndex {
+public class DefaultFileIndexFacade extends FileIndexFacade {
   private final Project myProject;
   private final VirtualFile myBaseDir;
 
-  public DefaultExcludedFileIndex(final Project project) {
+  public DefaultFileIndexFacade(final Project project) {
     super(project);
     myProject = project;
     myBaseDir = project.getBaseDir();
index 67df4b2cfef7cec5b97c5da137be1226f0b97241..776286daea40a1e9fbde8f4471d1fd82a72cf399 100644 (file)
@@ -28,7 +28,7 @@ import com.intellij.openapi.progress.ProcessCanceledException;
 import com.intellij.openapi.project.DumbAwareRunnable;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.project.ex.ProjectEx;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.startup.StartupManager;
 import com.intellij.openapi.util.*;
 import com.intellij.openapi.util.io.FileUtil;
@@ -112,9 +112,9 @@ public class ProjectLevelVcsManagerImpl extends ProjectLevelVcsManagerEx impleme
   private final ContentRevisionCache myContentRevisionCache;
   private MessageBusConnection myConnect;
   private VcsListener myVcsListener;
-  private final ExcludedFileIndex myExcludedIndex;
+  private final FileIndexFacade myExcludedIndex;
 
-  public ProjectLevelVcsManagerImpl(Project project, final FileStatusManager manager, MessageBus messageBus, final ExcludedFileIndex excludedFileIndex) {
+  public ProjectLevelVcsManagerImpl(Project project, final FileStatusManager manager, MessageBus messageBus, final FileIndexFacade excludedFileIndex) {
     myProject = project;
     myMessageBus = messageBus;
     mySerialization = new ProjectLevelVcsManagerSerialization();
index 9fd2bf1dca403364e7698f323c63770eea18594b..c4b52b04f87b762a5fe6db7b09cfefcfd11ab2d5 100644 (file)
@@ -17,7 +17,7 @@ package com.intellij.openapi.vcs.impl;
 
 import com.intellij.lifecycle.PeriodicalTasksCloser;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.util.Comparing;
 import com.intellij.openapi.vcs.*;
 import com.intellij.openapi.vfs.VirtualFile;
@@ -31,12 +31,12 @@ import java.util.*;
 public class VcsRootIterator {
   // folder path to files to be excluded
   private final Map<String, MyRootFilter> myOtherVcsFolders;
-  private final ExcludedFileIndex myExcludedFileIndex;
+  private final FileIndexFacade myExcludedFileIndex;
 
   public VcsRootIterator(final Project project, final AbstractVcs vcs) {
     final ProjectLevelVcsManager plVcsManager = ProjectLevelVcsManager.getInstance(project);
     myOtherVcsFolders = new HashMap<String, MyRootFilter>();
-    myExcludedFileIndex = PeriodicalTasksCloser.getInstance().safeGetService(project, ExcludedFileIndex.class);
+    myExcludedFileIndex = PeriodicalTasksCloser.getInstance().safeGetService(project, FileIndexFacade.class);
 
     final VcsRoot[] allRoots = plVcsManager.getAllVcsRoots();
     final VirtualFile[] roots = plVcsManager.getRootsUnderVcs(vcs);
@@ -111,7 +111,7 @@ public class VcsRootIterator {
     @Nullable private final PairProcessor<VirtualFile, VirtualFile[]> myDirectoryFilter;
     private final LinkedList<VirtualFile> myQueue;
     private final MyRootFilter myRootPresentFilter;
-    private final ExcludedFileIndex myExcludedFileIndex;
+    private final FileIndexFacade myExcludedFileIndex;
 
     private MyRootIterator(final Project project, final VirtualFile root, final Processor<FilePath> processor,
                            @Nullable PairProcessor<VirtualFile, VirtualFile[]> directoryFilter) {
@@ -121,7 +121,7 @@ public class VcsRootIterator {
       final ProjectLevelVcsManager plVcsManager = ProjectLevelVcsManager.getInstance(project);
       final AbstractVcs vcs = plVcsManager.getVcsFor(root);
       myRootPresentFilter = (vcs == null) ? null : new MyRootFilter(root, vcs.getName());
-      myExcludedFileIndex = PeriodicalTasksCloser.getInstance().safeGetService(project, ExcludedFileIndex.class);
+      myExcludedFileIndex = PeriodicalTasksCloser.getInstance().safeGetService(project, FileIndexFacade.class);
 
       myQueue = new LinkedList<VirtualFile>();
       myQueue.add(root);
index 73fe1d4cd3df7a83837235e3eba25c02520d1866..71515a0b4bd5d2d497ce6e623679d8446e3900b3 100644 (file)
@@ -18,7 +18,7 @@ package com.intellij.openapi.vcs.impl.projectlevelman;
 import com.intellij.lifecycle.PeriodicalTasksCloser;
 import com.intellij.openapi.diff.impl.patch.formove.FilePathComparator;
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.vcs.AbstractVcs;
 import com.intellij.openapi.vcs.VcsDirectoryMapping;
 import com.intellij.openapi.vcs.impl.DefaultVcsRootPolicy;
@@ -55,8 +55,8 @@ public class MappingsToRoots {
       while(i < result.size()) {
         final VirtualFile previous = result.get(i - 1);
         final VirtualFile current = result.get(i);
-        if (PeriodicalTasksCloser.getInstance().safeGetService(myProject, ExcludedFileIndex.class).isValidAncestor(previous, current)) {
-//        if (ExcludedFileIndex.getInstance(myProject).isValidAncestor(previous, current) && vcs.isVersionedDirectory(previous)) {
+        if (PeriodicalTasksCloser.getInstance().safeGetService(myProject, FileIndexFacade.class).isValidAncestor(previous, current)) {
+//        if (FileIndexFacade.getInstance(myProject).isValidAncestor(previous, current) && vcs.isVersionedDirectory(previous)) {
           result.remove(i);
         }
         else {
@@ -92,7 +92,7 @@ public class MappingsToRoots {
         final VirtualFile module = iterator.next();
         boolean included = false;
         for (VirtualFile root : result) {
-          if (PeriodicalTasksCloser.getInstance().safeGetService(myProject, ExcludedFileIndex.class).isValidAncestor(root, module)) {
+          if (PeriodicalTasksCloser.getInstance().safeGetService(myProject, FileIndexFacade.class).isValidAncestor(root, module)) {
             included = true;
             break;
           }
index e984ca0816fb93b135a5bcd60675b961d8fba61f..de5a377e056baccafa248c3f2fa844874ef9f846 100644 (file)
@@ -17,7 +17,7 @@ package org.jetbrains.idea.svn;
 
 import com.intellij.lifecycle.PeriodicalTasksCloser;
 import com.intellij.openapi.progress.ProgressIndicator;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.vcs.changes.ChangeListManager;
 import com.intellij.openapi.vfs.VirtualFile;
 import org.tmatesoft.svn.core.SVNCancelException;
@@ -30,14 +30,14 @@ import org.tmatesoft.svn.core.wc.SVNStatusClient;
 public class StatusWalkerPartnerImpl implements StatusWalkerPartner {
   private final SvnVcs myVcs;
   private final ChangeListManager myClManager;
-  private final ExcludedFileIndex myExcludedFileIndex;
+  private final FileIndexFacade myExcludedFileIndex;
   private final ProgressIndicator myIndicator;
   private ISVNStatusFileProvider myFileProvider;
 
   public StatusWalkerPartnerImpl(final SvnVcs vcs, final ProgressIndicator pi) {
     myVcs = vcs;
     myClManager = ChangeListManager.getInstance(myVcs.getProject());
-    myExcludedFileIndex = PeriodicalTasksCloser.getInstance().safeGetService(myVcs.getProject(), ExcludedFileIndex.class);
+    myExcludedFileIndex = PeriodicalTasksCloser.getInstance().safeGetService(myVcs.getProject(), FileIndexFacade.class);
     myIndicator = pi;
   }
 
index 106cd270b5cebe3aa3ad7e9d3459c48ecf26d333..7b8dc48fe9ada06cb385802f92d19063392783db 100644 (file)
@@ -17,8 +17,8 @@ package org.jetbrains.idea.svn.actions;
 
 import com.intellij.lifecycle.PeriodicalTasksCloser;
 import com.intellij.openapi.project.Project;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.vcs.changes.ChangeListManager;
-import com.intellij.openapi.roots.ExcludedFileIndex;
 import com.intellij.openapi.vfs.VirtualFile;
 import org.tmatesoft.svn.core.SVNDepth;
 import org.tmatesoft.svn.core.SVNException;
@@ -37,14 +37,14 @@ public class SvnExcludingIgnoredOperation {
 
   public static class Filter {
     private final Project myProject;
-    private final ExcludedFileIndex myIndex;
+    private final FileIndexFacade myIndex;
     private final ChangeListManager myClManager;
 
     public Filter(final Project project) {
       myProject = project;
 
       if (! project.isDefault()) {
-        myIndex = PeriodicalTasksCloser.getInstance().safeGetService(project, ExcludedFileIndex.class);
+        myIndex = PeriodicalTasksCloser.getInstance().safeGetService(project, FileIndexFacade.class);
         myClManager = ChangeListManager.getInstance(project);
       } else {
         myIndex = null;
index 4c48e8157ec125c46568992365376ef1323adc0a..241769dfdd9b9b80c5a94d179fa2302760512f7b 100644 (file)
@@ -20,13 +20,13 @@ import com.intellij.openapi.progress.ProgressIndicator;
 import com.intellij.openapi.progress.ProgressManager;
 import com.intellij.openapi.progress.Task;
 import com.intellij.openapi.project.Project;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.ui.Messages;
 import com.intellij.openapi.util.Ref;
 import com.intellij.openapi.util.io.FileUtil;
 import com.intellij.openapi.vcs.CheckoutProvider;
 import com.intellij.openapi.vcs.VcsConfiguration;
 import com.intellij.openapi.vcs.ex.ProjectLevelVcsManagerEx;
-import com.intellij.openapi.roots.ExcludedFileIndex;
 import com.intellij.openapi.vcs.update.RefreshVFsSynchronously;
 import com.intellij.openapi.vfs.LocalFileSystem;
 import com.intellij.openapi.vfs.VirtualFile;
@@ -227,7 +227,7 @@ public class SvnCheckoutProvider implements CheckoutProvider {
               final VirtualFile targetVf = SvnUtil.getVirtualFile(targetPath);
               if (targetVf == null) {
                 errorMessage.set("Can not find file: " + targetPath);
-              } else if (project.isDefault() || !PeriodicalTasksCloser.getInstance().safeGetService(project, ExcludedFileIndex.class)
+              } else if (project.isDefault() || !PeriodicalTasksCloser.getInstance().safeGetService(project, FileIndexFacade.class)
                 .isInContent(targetVf)) {
                 // do not pay attention to ignored/excluded settings
                 client.doImport(target, url, message, null, !includeIgnored, false, depth);
index 5b63c2a68e98524d222126cc89c1137e5b07c4a8..2e74e924ebc8f5e8f76e39dc1bdc5aa4fa649751 100644 (file)
@@ -24,7 +24,7 @@ import com.intellij.openapi.project.Project;
 import com.intellij.openapi.ui.DialogWrapper;
 import com.intellij.openapi.ui.Messages;
 import com.intellij.openapi.util.Pair;
-import com.intellij.openapi.roots.ExcludedFileIndex;
+import com.intellij.openapi.roots.FileIndexFacade;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.util.PlatformIcons;
 import com.intellij.util.ui.UIUtil;
@@ -210,7 +210,7 @@ public class IntegratedSelectedOptionsDialog extends DialogWrapper {
 
   private boolean underProject(final File file) {
     final VirtualFile vf = SvnUtil.getVirtualFile(file.getAbsolutePath());
-    return (vf == null) || PeriodicalTasksCloser.getInstance().safeGetService(myProject, ExcludedFileIndex.class).isInContent(vf);
+    return (vf == null) || PeriodicalTasksCloser.getInstance().safeGetService(myProject, FileIndexFacade.class).isInContent(vf);
   }
 
   public WorkingCopyInfo getSelectedWc() {
index 54c6e280338375b8488568368d0149437ac63f78..43ed28802dd9cacf484de9b77688276bc134b935 100644 (file)
                     serviceImplementation="com.intellij.openapi.vcs.changes.ui.ChangesModuleGroupingPolicyFactory"/>
     <projectService serviceInterface="com.intellij.openapi.vcs.impl.DefaultVcsRootPolicy"
                     serviceImplementation="com.intellij.openapi.vcs.impl.ModuleDefaultVcsRootPolicy"/>
-    <projectService serviceInterface="com.intellij.openapi.roots.ExcludedFileIndex"
-                    serviceImplementation="com.intellij.openapi.vcs.impl.ProjectExcludedFileIndex"/>
+    <projectService serviceInterface="com.intellij.openapi.roots.FileIndexFacade"
+                    serviceImplementation="com.intellij.openapi.vcs.impl.ProjectFileIndexFacade"/>
     <projectService serviceInterface="com.intellij.openapi.vcs.impl.VcsPathPresenter"
                     serviceImplementation="com.intellij.openapi.vcs.impl.ModuleVcsPathPresenter"/>