mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CR-IC-41 Vertical line block match disapear view line in java code (IDEA-99572)
NPE was reported for the expression 'myComments.put(language, comments = LanguageParserDefinitions.INSTANCE.forLanguage(language).getCommentTokens());
This commit is contained in:
@@ -545,7 +545,16 @@ public class IndentsPass extends TextEditorHighlightingPass implements DumbAware
|
||||
Language language = tokenType.getLanguage();
|
||||
TokenSet comments = myComments.get(language);
|
||||
if (comments == null) {
|
||||
myComments.put(language, comments = LanguageParserDefinitions.INSTANCE.forLanguage(language).getCommentTokens());
|
||||
ParserDefinition definition = LanguageParserDefinitions.INSTANCE.forLanguage(language);
|
||||
if (definition != null) {
|
||||
comments = definition.getCommentTokens();
|
||||
}
|
||||
if (comments == null) {
|
||||
return fallbackColumn;
|
||||
}
|
||||
else {
|
||||
myComments.put(language, comments);
|
||||
}
|
||||
}
|
||||
if (comments.contains(tokenType) && indentOffset == it.getStart()) {
|
||||
String prefix = COMMENT_PREFIXES.get(tokenType);
|
||||
|
||||
Reference in New Issue
Block a user