private static boolean noBorderEffectPainted(EditorEx editor, Caret caret) {
    int offset = caret.getOffset();
    EditorColorsScheme colorsScheme = editor.getColorsScheme();
    return editor.getMarkupModel().processRangeHighlightersOverlappingWith(offset, offset, h -> {
      TextAttributes attrs = h.getTextAttributes(colorsScheme);
      return attrs == null || !attrs.hasEffects() ||
             TextAttributesEffectsBuilder.create(attrs).getEffectDescriptor(TextAttributesEffectsBuilder.EffectSlot.FRAME_SLOT) == null;
    });
  }
private static boolean noBorderEffectPainted(EditorEx editor, Caret caret)