Search in sources :

Example 1 with EditorCustomElementRenderer

use of com.intellij.openapi.editor.EditorCustomElementRenderer in project intellij-community by JetBrains.

the class InlineElementData method addHighlToView.

@Override
public void addHighlToView(Editor view, EditorColorsScheme scheme, Map<TextAttributesKey, String> displayText) {
    int offset = getStartOffset();
    ParameterHintsPresentationManager.getInstance().addHint(view, offset, myText, false, false);
    List<Inlay> inlays = view.getInlayModel().getInlineElementsInRange(offset, offset);
    for (Inlay inlay : inlays) {
        EditorCustomElementRenderer renderer = inlay.getRenderer();
        if (!(renderer instanceof RendererWrapper)) {
            Disposer.dispose(inlay);
            RendererWrapper wrapper = new RendererWrapper(renderer);
            wrapper.drawBorder = myAddBorder;
            view.getInlayModel().addInlineElement(offset, wrapper);
        }
    }
}
Also used : EditorCustomElementRenderer(com.intellij.openapi.editor.EditorCustomElementRenderer) Inlay(com.intellij.openapi.editor.Inlay)

Aggregations

EditorCustomElementRenderer (com.intellij.openapi.editor.EditorCustomElementRenderer)1 Inlay (com.intellij.openapi.editor.Inlay)1