Using setVerticalScrollbarOrientation(EditorEx.VERTICAL_SCROLLBAR_LEFT) on editor from PsiAwareTextEditorImpl does not separate scrollbar from editor text

In my plugin I would like to have the scrollbar on the left hand side. I am accomplishing this by calling the following on textEditor (which is an instance of PsiAwareTextEditorImpl)

((EditorEx) textEditor.getEditor).setVerticalScrollbarOrientation(EditorEx.VERTICAL_SCROLLBAR_LEFT);

However, when I do this the scrolllbar is placed directly over the text (see attached image below)


However if instead I create a new editor as follows:

EditorFactory factory = EditorFactory.getInstance();
EditorEx editor = (EditorEx) factory.createEditor(document, project);
the resultant editor has the desired property of making the scrollbar seperate from the text (see attached image below)


How can I accomplish the same thing using the editor from the PisAwareTextEditorImpl directly.
Comment actions Permalink

It's not available via API currently, editors that are 'file' editors (PsiAwareTextEditorImpl) always have overlaid scrollbars.

Comment actions Permalink

Thanks Dmitry, even if it was a negative result :)


Please sign in to leave a comment.