void (ActionEvent e) { VirtualFile toSelect = getVFileFromEditor(); if (toSelect == null) { final String scratchesRoot = ScratchFileService.getInstance().getRootPath(ScratchRootType.getInstance()); toSelect = LocalFileSystem.getInstance().findFileByPath(scratchesRoot); } final VirtualFile file = FileChooser.chooseFile(FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor(), myScratchPathField.getComponent(), project, toSelect); if (file != null) { setVFileToEditor(file); } }