boolean (@Nullable final Project project, @Nullable final VirtualFile virtualFile) { if (virtualFile == null || project == null || virtualFile instanceof VirtualFileWindow) { return false; } PsiFile psiFile = PsiManager.getInstance(project).findFile(virtualFile); return psiFile != null && PydevConsoleRunnerUtil.isInPydevConsole(psiFile); }