void (@NotNull Project project, @NotNull IdeScriptEngineManager.EngineInfo info) { List<String> extensions = info.fileExtensions; try { String pathName = PathUtil.makeFileName(DEFAULT_FILE_NAME, ContainerUtil.getFirstItem(extensions)); VirtualFile virtualFile = IdeConsoleRootType.getInstance().findFile(project, pathName, ScratchFileService.Option.create_if_missing); if (virtualFile != null) { virtualFile.putUserData(SELECTED_ENGINE_INFO_KEY, info); FileEditorManager.getInstance(project).openFile(virtualFile, true); } } catch (IOException ex) { LOG.error(ex); } }