void (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, myTreePanel); editor.getSelectionModel().addSelectionListener(mySelectionListener); } }