Editor (final boolean requestFocus) { final PsiFile psiFile = getFile(); final Project project = psiFile.getProject(); if (project.isDisposed()) { return null; } final VirtualFile virtualFile = psiFile.getVirtualFile(); if (virtualFile == null || !virtualFile.isValid()) { return null; } final int offset = getOffset(); if (offset < 0) { return null; } return FileEditorManager.getInstance(project).openTextEditor(new OpenFileDescriptor(project, virtualFile, offset), requestFocus); }