forked from JetBrains/intellij-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduced FileTypeSpecificInputFilter for index to expose its applic…
…ability to specific file types: allows us to have faster calculation of affected indices candidates
- Loading branch information
Maxim.Mossienko
authored and
Maxim.Mossienko
committed
Jun 6, 2013
1 parent
3a5eca9
commit 3c96235
Showing
2 changed files
with
5 additions
and
16 deletions.
There are no files selected for viewing
12 changes: 4 additions & 8 deletions
12
Dart/src/com/jetbrains/lang/dart/ide/index/DartInputFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
package com.jetbrains.lang.dart.ide.index; | ||
|
||
import com.intellij.openapi.fileTypes.FileType; | ||
import com.intellij.openapi.fileTypes.StdFileTypes; | ||
import com.intellij.openapi.vfs.VirtualFile; | ||
import com.intellij.util.indexing.FileBasedIndex; | ||
import com.intellij.util.indexing.DefaultFileTypeSpecificInputFilter; | ||
import com.jetbrains.lang.dart.DartFileType; | ||
|
||
public class DartInputFilter implements FileBasedIndex.InputFilter { | ||
public class DartInputFilter extends DefaultFileTypeSpecificInputFilter { | ||
public static DartInputFilter INSTANCE = new DartInputFilter(); | ||
|
||
@Override | ||
public boolean acceptInput(VirtualFile file) { | ||
FileType type = file.getFileType(); | ||
return type == DartFileType.INSTANCE || type == StdFileTypes.HTML; | ||
public DartInputFilter() { | ||
super(DartFileType.INSTANCE, StdFileTypes.HTML); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters