SourceCodeFile sourceCodeFile = (SourceCodeFile) virtualFile;
DatabaseEditableObjectFile databaseFile = sourceCodeFile.getDatabaseFile();
if (!editorManager.isFileOpen(databaseFile)) {
editorManager.openFile(databaseFile, requestFocus);
}
BasicTextEditor textEditor = EditorUtil.getFileEditor(databaseFile, virtualFile);
descriptor.navigateIn(textEditor.getEditor());
return;
}
Editor editor = editorManager.getSelectedTextEditor();
if (editor != null && virtualFile == DocumentUtil.getVirtualFile(editor)) {
super.navigate(requestFocus);
return;
}
FileEditor[] fileEditors = editorManager.getSelectedEditors();
for (FileEditor fileEditor : fileEditors) {
if (fileEditor instanceof DDLFileEditor) {
DDLFileEditor textEditor = (DDLFileEditor) fileEditor;
if (textEditor.getVirtualFile() == virtualFile) {
descriptor.navigateIn(textEditor.getEditor());
return;
}
}
}