mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
IDEA-320457: add support for FileTypeStrategy to FileTypeInputFilterPredicate and restore legacy behavior of ruby, html and json indexers
behavior was unintentionally changed in one of the previous commits which migrated these indexers to indexing hint API. Originally these indexers were checking file type before substitution. After migration these indexers check file type after substitution. In most cases these file types are the same, so this change went unnoticed. Now (after this commit) these indexers check file type before substitution (as it was before migration). GitOrigin-RevId: 4e657675fba588df5d2cc8dac89f45c8c1d61c31
This commit is contained in:
committed by
intellij-monorepo-bot
parent
329180b4a2
commit
ea331c4995
@@ -24,6 +24,8 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.intellij.util.indexing.hints.BaseFileTypeInputFilter.FileTypeStrategy.BEFORE_SUBSTITUTION;
|
||||
|
||||
public class HtmlTagIdIndex extends XmlIndex<Integer> {
|
||||
public static final ID<String, Integer> INDEX = ID.create("HtmlTagIdIndex");
|
||||
|
||||
@@ -36,7 +38,7 @@ public class HtmlTagIdIndex extends XmlIndex<Integer> {
|
||||
@NotNull
|
||||
@Override
|
||||
public FileBasedIndex.InputFilter getInputFilter() {
|
||||
return new BaseFileTypeInputFilter() {
|
||||
return new BaseFileTypeInputFilter(BEFORE_SUBSTITUTION) {
|
||||
@Override
|
||||
public boolean whenAllOtherHintsUnsure(@NotNull IndexedFile file) {
|
||||
return file.getFile().isInLocalFileSystem();
|
||||
|
||||
Reference in New Issue
Block a user