int (Rectangle visibleRect, int orientation, int direction) { return ReadAction.compute(() -> { if (orientation == SwingConstants.VERTICAL) { return myEditor.getLineHeight(); } // if orientation == SwingConstants.HORIZONTAL return EditorUtil.getSpaceWidth(Font.PLAIN, myEditor); }); }