IDEA-CR-59549 review fixes

GitOrigin-RevId: 4ec7266a3d3a439a8e40e5c649a62db4dc8cf2c4
This commit is contained in:
Alexandr Evstigneev
2020-03-10 09:34:33 +00:00
committed by intellij-monorepo-bot
parent 23247c5fcd
commit e70610cc7f
@@ -143,17 +143,7 @@ public class IdentifierHighlighterPass extends TextEditorHighlightingPass {
private void collectCodeBlockMarkerRanges() {
PsiElement contextElement = myFile.findElementAt(
TargetElementUtil.adjustOffset(myFile, myEditor.getDocument(), myEditor.getCaretModel().getOffset()));
if (contextElement == null) {
return;
}
for (CodeBlockSupportHandler handler : CodeBlockSupportHandler.EP.allForLanguage(contextElement.getLanguage())) {
List<TextRange> rangesToHighlight = handler.getCodeBlockMarkerRanges(contextElement);
if (!rangesToHighlight.isEmpty()) {
myCodeBlockMarkerRanges.addAll(rangesToHighlight);
return;
}
}
myCodeBlockMarkerRanges.addAll(CodeBlockSupportHandler.findMarkersRanges(contextElement));
}
/**