use of com.intellij.codeInsight.daemon.impl.TrafficLightRenderer in project intellij-community by JetBrains.
the class FontEditorPreview method installTrafficLights.
static void installTrafficLights(@NotNull EditorEx editor) {
TrafficLightRenderer renderer = new TrafficLightRenderer(null, null, null) {
@NotNull
@Override
protected DaemonCodeAnalyzerStatus getDaemonCodeAnalyzerStatus(@NotNull SeverityRegistrar severityRegistrar) {
DaemonCodeAnalyzerStatus status = new DaemonCodeAnalyzerStatus();
status.errorAnalyzingFinished = true;
status.errorCount = new int[] { 1, 2 };
return status;
}
};
Disposer.register((Disposable) editor.getCaretModel(), renderer);
((EditorMarkupModel) editor.getMarkupModel()).setErrorStripeRenderer(renderer);
((EditorMarkupModel) editor.getMarkupModel()).setErrorStripeVisible(true);
}
Aggregations