if (script == null)
return;
final OpenFileDescriptor desc = new OpenFileDescriptor(project, script);
if (desc.canNavigateToSource()) {
desc.navigate(true);
final FileEditor fileEditor = fileMgr.getSelectedEditor(script);
if (fileEditor instanceof TextEditor) {
final Editor editor = ((TextEditor) fileEditor).getEditor();
final Document document = editor.getDocument();
final PsiFile psiFile = psiMgr.getPsiFile(document);