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)

PSI.png

However if instead I create a new editor as follows:

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


nonPSI.png

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

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

0
Comment actions Permalink

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

0

Please sign in to leave a comment.