import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
/**
* Author: dmitrylomov
*/
public abstract class PlatformIdTableBuilding {
public static final Key<EditorHighlighter> EDITOR_HIGHLIGHTER = new Key<EditorHighlighter>("Editor");
- private static final Map<FileType, DataIndexer<TodoIndexEntry, Integer, FileContent>> ourTodoIndexers = new HashMap<FileType, DataIndexer<TodoIndexEntry, Integer, FileContent>>();
private static final TokenSet ABSTRACT_FILE_COMMENT_TOKENS = TokenSet.create(CustomHighlighterTokenType.LINE_COMMENT, CustomHighlighterTokenType.MULTI_LINE_COMMENT);
private PlatformIdTableBuilding() {}
@Nullable
public static DataIndexer<TodoIndexEntry, Integer, FileContent> getTodoIndexer(FileType fileType, final VirtualFile virtualFile) {
- final DataIndexer<TodoIndexEntry, Integer, FileContent> indexer = ourTodoIndexers.get(fileType);
-
- if (indexer != null) {
- return indexer;
- }
-
final DataIndexer<TodoIndexEntry, Integer, FileContent> extIndexer;
if (fileType instanceof SubstitutedFileType && !((SubstitutedFileType)fileType).isSameFileType()) {
SubstitutedFileType sft = (SubstitutedFileType)fileType;
return b;
}
- @Deprecated
- public static void registerTodoIndexer(@NotNull FileType fileType, DataIndexer<TodoIndexEntry, Integer, FileContent> indexer) {
- ourTodoIndexers.put(fileType, indexer);
- }
-
public static boolean isTodoIndexerRegistered(@NotNull FileType fileType) {
- return ourTodoIndexers.containsKey(fileType) || TodoIndexers.INSTANCE.forFileType(fileType) != null || fileType instanceof InternalFileType;
+ return TodoIndexers.INSTANCE.forFileType(fileType) != null || fileType instanceof InternalFileType;
}
private static class CompositeTodoIndexer extends VersionedTodoIndexer {