Search in sources :

Example 1 with PsiAwareTextEditorImpl

use of com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl in project intellij-community by JetBrains.

the class XVariablesViewBase method registerInlineEvaluator.

private void registerInlineEvaluator(final XStackFrame stackFrame, final XSourcePosition position, final Project project) {
    final VirtualFile file = position.getFile();
    final FileEditor fileEditor = FileEditorManagerEx.getInstanceEx(project).getSelectedEditor(file);
    if (fileEditor instanceof PsiAwareTextEditorImpl) {
        final Editor editor = ((PsiAwareTextEditorImpl) fileEditor).getEditor();
        removeSelectionListener();
        mySelectionListener = new MySelectionListener(editor, stackFrame, project);
        editor.getSelectionModel().addSelectionListener(mySelectionListener);
    }
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) FileEditor(com.intellij.openapi.fileEditor.FileEditor) Editor(com.intellij.openapi.editor.Editor) FileEditor(com.intellij.openapi.fileEditor.FileEditor) PsiAwareTextEditorImpl(com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl)

Aggregations

Editor (com.intellij.openapi.editor.Editor)1 FileEditor (com.intellij.openapi.fileEditor.FileEditor)1 PsiAwareTextEditorImpl (com.intellij.openapi.fileEditor.impl.text.PsiAwareTextEditorImpl)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1