void (ActionEvent e) { PropertiesComponent propertiesComponent = PropertiesComponent.getInstance(); FileChooserDescriptor descriptor = new FileChooserDescriptor(true, false, false, false, false, true) .withFileFilter(file -> Comparing.equal(file.getExtension(), "html", file.isCaseSensitive())); String value = propertiesComponent.getValue(LAST_OPENED_TIP_PATH); VirtualFile lastOpenedTip = value != null ? LocalFileSystem.getInstance().findFileByPath(value) : null; VirtualFile[] pathToSelect = lastOpenedTip != null ? new VirtualFile[]{lastOpenedTip} : VirtualFile.EMPTY_ARRAY; VirtualFile[] choose = FileChooserFactory.getInstance().createFileChooser(descriptor, null, myTipPanel).choose(null, pathToSelect); if (choose.length > 0) { ArrayList<TipAndTrickBean> tips = new ArrayList<>(); for (VirtualFile file : choose) { TipAndTrickBean tip = new TipAndTrickBean(); tip.fileName = file.getPath(); tip.featureId = null; tips.add(tip); propertiesComponent.setValue(LAST_OPENED_TIP_PATH, file.getPath()); } myTipPanel.setTips(new TipsSortingResult(tips)); } }