mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-6700 TODOs not recognized on multiple level language template
This commit is contained in:
+1
-1
@@ -163,7 +163,7 @@ public abstract class PlatformIdTableBuilding {
|
||||
highlighter = editorHighlighter;
|
||||
}
|
||||
else {
|
||||
highlighter = HighlighterFactory.createHighlighter(null, myFile);
|
||||
highlighter = HighlighterFactory.createHighlighter(inputData.getProject(), myFile);
|
||||
highlighter.setText(chars);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ public class TodoIndex extends FileBasedIndexExtension<TodoIndexEntry, Integer>
|
||||
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return 5;
|
||||
return 6;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.intellij.openapi.progress.ProgressManager;
|
||||
import com.intellij.openapi.util.TextRange;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.impl.cache.CacheUtil;
|
||||
import com.intellij.psi.impl.cache.TodoCacheManager;
|
||||
import com.intellij.psi.search.IndexPattern;
|
||||
import com.intellij.psi.search.IndexPatternOccurrence;
|
||||
@@ -187,15 +188,7 @@ public class IndexPatternSearcher implements QueryExecutor<IndexPatternOccurrenc
|
||||
if (lexer.getTokenStart() >= range.getEndOffset()) break;
|
||||
}
|
||||
|
||||
boolean isComment = commentTokens.contains(tokenType);
|
||||
if (!isComment) {
|
||||
final Language commentLang = tokenType.getLanguage();
|
||||
final ParserDefinition parserDefinition = LanguageParserDefinitions.INSTANCE.forLanguage(commentLang);
|
||||
if (parserDefinition != null) {
|
||||
final TokenSet langCommentTokens = parserDefinition.getCommentTokens();
|
||||
isComment = langCommentTokens.contains(tokenType);
|
||||
}
|
||||
}
|
||||
boolean isComment = commentTokens.contains(tokenType) || CacheUtil.isInComments(tokenType);
|
||||
|
||||
if (isComment) {
|
||||
final int startDelta = builderForFile != null ? builderForFile.getCommentStartDelta(lexer.getTokenType()) : 0;
|
||||
|
||||
Reference in New Issue
Block a user