use of com.intellij.openapi.editor.colors.CodeInsightColors.ERRORS_ATTRIBUTES in project intellij-community by JetBrains.
the class ParameterNameHintsConfigurable method highlightErrorLines.
private static void highlightErrorLines(@NotNull List<Integer> lines, @NotNull EditorTextField editorTextField) {
Editor editor = editorTextField.getEditor();
if (editor == null)
return;
final TextAttributes attributes = editor.getColorsScheme().getAttributes(ERRORS_ATTRIBUTES);
final Document document = editor.getDocument();
final int totalLines = document.getLineCount();
MarkupModel model = editor.getMarkupModel();
model.removeAllHighlighters();
lines.stream().filter((current) -> current < totalLines).forEach((line) -> model.addLineHighlighter(line, HighlighterLayer.ERROR, attributes));
}
Aggregations