SourceCodeEditor sourceCodeEditor = null;
if (databaseFile.getContentFiles().size() > 1) {
FileEditorManager editorManager = FileEditorManager.getInstance(databaseFile.getProject());
FileEditor[] fileEditors = editorManager.getEditors(databaseFile);
if (fileEditors.length >= runtimeInfo.getNamespace()) {
FileEditor fileEditor = fileEditors[runtimeInfo.getNamespace() -1];
sourceCodeEditor = (SourceCodeEditor) fileEditor;
databaseFile.FAKE_DOCUMENT.set(sourceCodeEditor.getEditor().getDocument());
} else {
FileEditor fileEditor = EditorUtil.getFileEditor(databaseFile, databaseFile.getMainContentFile());
if (fileEditor != null && fileEditor instanceof SourceCodeEditor) {
sourceCodeEditor = (SourceCodeEditor) fileEditor;
}
}
} else {
FileEditor fileEditor = EditorUtil.getFileEditor(databaseFile, databaseFile.getMainContentFile());
if (fileEditor != null && fileEditor instanceof SourceCodeEditor) {
sourceCodeEditor = (SourceCodeEditor) fileEditor;
}
}
LogicalPosition position = new LogicalPosition(line, 0);