make all indices psi dependent by default (fix grammatical review marks from IDEA-CR-47345)

GitOrigin-RevId: 0c6168ece602bc809deb8262d5d9a3dec55e5cc0
This commit is contained in:
Dmitry Batkovich
2019-05-21 19:12:12 +03:00
committed by intellij-monorepo-bot
parent 9879dc60da
commit dfe03c84b6
8 changed files with 9 additions and 9 deletions
@@ -6,9 +6,9 @@ import org.jetbrains.annotations.ApiStatus;
/**
* Marker interface of index that use document changes to update it's data. These indices shouldn't depend on PSI-related stuff.
*
* Note, every {@link FileBasedIndexExtension} with {@link FileBasedIndexExtension#dependsOnFileContent()} returns false is treated as document changes dependent.
* Note, every {@link FileBasedIndexExtension} where {@link FileBasedIndexExtension#dependsOnFileContent()} returns false is treated as document change dependent.
*/
@ApiStatus.Experimental
public interface DocumentChangesDependentIndex {
public interface DocumentChangeDependentIndex {
}
@@ -18,7 +18,7 @@ package com.intellij.util.indexing;
/**
* Marker interface of index that is built from PSI, meaning its invalidation will happen upon producing new PSI.
*
* @deprecated by default all content-aware indices are psi dependent. Use {@link DocumentChangesDependentIndex} to make index psi-independent.
* @deprecated by default all content-aware indices are psi dependent. Use {@link DocumentChangeDependentIndex} to make index psi-independent.
*/
@Deprecated
public interface PsiDependentIndex {
@@ -43,7 +43,7 @@ import java.util.Map;
/**
* @author Eugene Zhuravlev
*/
public class IdIndex extends FileBasedIndexExtension<IdIndexEntry, Integer> implements DocumentChangesDependentIndex {
public class IdIndex extends FileBasedIndexExtension<IdIndexEntry, Integer> implements DocumentChangeDependentIndex {
@NonNls public static final ID<IdIndexEntry, Integer> NAME = ID.create("IdIndex");
private final FileBasedIndex.InputFilter myInputFilter = file -> isIndexable(file.getFileType());
@@ -41,7 +41,7 @@ import java.util.Collection;
import java.util.Map;
public class TrigramIndex extends ScalarIndexExtension<Integer> implements CustomInputsIndexFileBasedIndexExtension<Integer>,
DocumentChangesDependentIndex {
DocumentChangeDependentIndex {
public static final boolean ENABLED = SystemProperties.getBooleanProperty("idea.internal.trigramindex.enabled", true);
public static final ID<Integer,Void> INDEX_ID = ID.create("Trigram.Index");
@@ -2532,7 +2532,7 @@ public final class FileBasedIndexImpl extends FileBasedIndex implements Disposab
if (INDICES_ARE_PSI_DEPENDENT_BY_DEFAULT) {
return extension instanceof FileBasedIndexExtension &&
((FileBasedIndexExtension<?, ?>)extension).dependsOnFileContent() &&
!(extension instanceof DocumentChangesDependentIndex);
!(extension instanceof DocumentChangeDependentIndex);
} else {
return extension instanceof PsiDependentIndex;
}
@@ -20,7 +20,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
public class JavaFxCustomComponentsIndex extends FileBasedIndexExtension<String, Set<String>> implements DocumentChangesDependentIndex {
public class JavaFxCustomComponentsIndex extends FileBasedIndexExtension<String, Set<String>> implements DocumentChangeDependentIndex {
@NonNls public static final ID<String, Set<String>> KEY = ID.create("javafx.custom.component");
@@ -28,7 +28,7 @@ import org.jetbrains.annotations.NotNull;
import java.util.*;
public class JavaFxIdsIndex extends FileBasedIndexExtension<String, Set<String>> implements DocumentChangesDependentIndex {
public class JavaFxIdsIndex extends FileBasedIndexExtension<String, Set<String>> implements DocumentChangeDependentIndex {
@NonNls public static final ID<String, Set<String>> KEY = ID.create("javafx.id.name");
@@ -39,7 +39,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class XsltSymbolIndex extends FileBasedIndexExtension<String, XsltSymbolIndex.Kind> implements DocumentChangesDependentIndex {
public class XsltSymbolIndex extends FileBasedIndexExtension<String, XsltSymbolIndex.Kind> implements DocumentChangeDependentIndex {
@NonNls
public static final ID<String, Kind> NAME = ID.create("XsltSymbolIndex");