@Override
  public void showErrorHint(@NotNull Editor editor,
                            @NotNull @HintText String hintText,
                            int offset1,
                            int offset2,
                            short constraint,
                            int flags,
                            int timeout) {
    JComponent label = HintUtil.createErrorLabel(hintText);
    LightweightHint hint = new LightweightHint(label);
    final VisualPosition pos1 = editor.offsetToVisualPosition(offset1);
    final VisualPosition pos2 = editor.offsetToVisualPosition(offset2);
    final Point p = getHintPosition(hint, editor, pos1, pos2, constraint);
    showEditorHint(hint, editor, p, flags, timeout, false);
  }
@Override
  public void showErrorHint(@NotNull Editor editor,
                            @NotNull @HintText String hintText,
                            int offset1,
                            int offset2,
                            short constraint,
                            int flags,
                            int timeout)