From 1a49cf6aa4befc280320fc71f975a71cdc9c01e0 Mon Sep 17 00:00:00 2001 From: Dmitry Lomov Date: Tue, 8 May 2012 18:26:13 +0200 Subject: [PATCH] FileBasedIndex --- .../src/com/intellij/util/indexing/FileBasedIndex.java | 6 ++++++ .../src/com/intellij/util/indexing/FileBasedIndexImpl.java | 2 +- .../com/intellij/util/indexing/UnindexedFilesUpdater.java | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java index 0c7c23ce6f62..378801652209 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java @@ -37,6 +37,7 @@ import java.util.Set; * Author: dmitrylomov */ public abstract class FileBasedIndex implements ApplicationComponent { + public abstract void iterateIndexableFiles(@NotNull ContentIterator processor, @NotNull Project project, ProgressIndicator indicator); public abstract void registerIndexableSet(@NotNull IndexableFileSet set, @Nullable Project project); @@ -91,6 +92,11 @@ public abstract class FileBasedIndex implements ApplicationComponent { public abstract void ensureUpToDate(@NotNull ID indexId, @Nullable Project project, @Nullable GlobalSearchScope filter); + protected abstract void ensureUpToDate(@NotNull ID indexId, + @Nullable Project project, + @Nullable GlobalSearchScope filter, + @Nullable VirtualFile restrictedFile); + public abstract void requestRebuild(ID indexId, Throwable throwable); public abstract void scheduleRebuild(@NotNull ID indexId, @NotNull Throwable e); diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java index a5f15bf670d1..d658dd11616b 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java @@ -737,6 +737,7 @@ public class FileBasedIndexImpl extends FileBasedIndex { ensureUpToDate(indexId, project, filter, null); } + @Override protected void ensureUpToDate(@NotNull final ID indexId, @Nullable Project project, @Nullable GlobalSearchScope filter, @@ -2144,7 +2145,6 @@ public class FileBasedIndexImpl extends FileBasedIndex { myIndexableSetToProjectMap.put(set, project); } - @Override public void removeIndexableSet(@NotNull IndexableFileSet set) { myChangedFilesCollector.forceUpdate(null, null, null, true); myIndexableSets.remove(set); diff --git a/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java b/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java index a0e42f63198d..ad0c20902d73 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.