@Override public void addMarkupModelListener(@NotNull Disposable parentDisposable, @NotNull final MarkupModelListener listener) { myListeners.add(listener); Disposer.register(parentDisposable, new Disposable() { @Override public void dispose() { removeMarkupModelListener(listener); } }); }
public GutterUpdateScheduler(@NotNull ConsoleGutterComponent lineStartGutter, @NotNull ConsoleGutterComponent lineEndGutter) { this.lineStartGutter = lineStartGutter; this.lineEndGutter = lineEndGutter; // console view can invoke markupModel.removeAllHighlighters(), so, we must be aware of it getHistoryViewer().getMarkupModel().addMarkupModelListener(GutteredLanguageConsole.this, new MarkupModelListener.Adapter() { @Override public void beforeRemoved(@NotNull RangeHighlighterEx highlighter) { if (lineSeparatorPainter == highlighter) { lineSeparatorPainter = null; } } }); }
@Override public void fireAttributesChanged(@Nonnull RangeHighlighterEx segmentHighlighter, boolean renderersChanged, boolean fontStyleOrColorChanged) { for (MarkupModelListener listener : myListeners) { listener.attributesChanged(segmentHighlighter, renderersChanged, fontStyleOrColorChanged); } }
public GutterUpdateScheduler(@Nonnull ConsoleGutterComponent lineStartGutter, @Nonnull ConsoleGutterComponent lineEndGutter) { this.lineStartGutter = lineStartGutter; this.lineEndGutter = lineEndGutter; // console view can invoke markupModel.removeAllHighlighters(), so, we must be aware of it getHistoryViewer().getMarkupModel().addMarkupModelListener(GutteredLanguageConsole.this, new MarkupModelListener.Adapter() { @Override public void beforeRemoved(@Nonnull RangeHighlighterEx highlighter) { if (lineSeparatorPainter == highlighter) { lineSeparatorPainter = null; } } }); }
@Override public void addMarkupModelListener(@NotNull Disposable parentDisposable, @NotNull MarkupModelListener listener) { }
void removeMarkupModelListener(@NotNull MarkupModelListener listener) { boolean success = myListeners.remove(listener); LOG.assertTrue(success); }
@Override public void fireAttributesChanged(@NotNull RangeHighlighterEx segmentHighlighter, boolean renderersChanged) { for (MarkupModelListener listener : myListeners) { listener.attributesChanged(segmentHighlighter, renderersChanged); } }
@Override public void fireAfterAdded(@NotNull RangeHighlighterEx segmentHighlighter) { for (MarkupModelListener listener : myListeners) { listener.afterAdded(segmentHighlighter); } }
@Override public void fireBeforeRemoved(@NotNull RangeHighlighterEx segmentHighlighter) { for (MarkupModelListener listener : myListeners) { listener.beforeRemoved(segmentHighlighter); } }
@Override public void addMarkupModelListener(@NotNull Disposable parentDisposable, @NotNull MarkupModelListener listener) { myHostModel.addMarkupModelListener(parentDisposable, listener); }
public void removeMarkupModelListener(@NotNull MarkupModelListener listener) { boolean success = myListeners.remove(listener); LOG.assertTrue(success); }
protected void fireAttributesChanged(RangeHighlighterEx segmentHighlighter) { for (MarkupModelListener listener : myListeners) { listener.attributesChanged(segmentHighlighter); } }
private void fireAfterAdded(RangeHighlighterEx segmentHighlighter) { for (MarkupModelListener listener : myListeners) { listener.afterAdded(segmentHighlighter); } }
void fireBeforeRemoved(RangeHighlighterEx segmentHighlighter) { for (MarkupModelListener listener : myListeners) { listener.beforeRemoved(segmentHighlighter); } }
@Override public void addMarkupModelListener(@Nonnull Disposable parentDisposable, @Nonnull MarkupModelListener listener) { }
@Override public void addMarkupModelListener(@Nonnull Disposable parentDisposable, @Nonnull final MarkupModelListener listener) { myListeners.add(listener); Disposer.register(parentDisposable, () -> removeMarkupModelListener(listener)); }
private void removeMarkupModelListener(@Nonnull MarkupModelListener listener) { boolean success = myListeners.remove(listener); LOG.assertTrue(success); }
@Override public void fireAfterAdded(@Nonnull RangeHighlighterEx segmentHighlighter) { for (MarkupModelListener listener : myListeners) { listener.afterAdded(segmentHighlighter); } }
@Override public void fireBeforeRemoved(@Nonnull RangeHighlighterEx segmentHighlighter) { for (MarkupModelListener listener : myListeners) { listener.beforeRemoved(segmentHighlighter); } }
@Override public void addMarkupModelListener(@Nonnull Disposable parentDisposable, @Nonnull MarkupModelListener listener) { myHostModel.addMarkupModelListener(parentDisposable, listener); }
@Override public void addMarkupModelListener(@Nonnull Disposable parentDisposable, @Nonnull MarkupModelListener listener) { myDelegate.addMarkupModelListener(parentDisposable, listener); }
void addMarkupModelListener(@NotNull Disposable parentDisposable, @NotNull MarkupModelListener listener);
void addMarkupModelListener(@Nonnull Disposable parentDisposable, @Nonnull MarkupModelListener listener);