void (AnActionButton button) { FileChooserDescriptor myDescriptor = FileChooserDescriptorFactory.createMultipleJavaPathDescriptor(); myDescriptor.setTitle(JavaUiBundle.message("module.javadoc.add.path.title")); myDescriptor.setDescription(JavaUiBundle.message("module.javadoc.add.path.prompt")); VirtualFile[] files = FileChooser.chooseFiles(myDescriptor, myTable, getProject(), null); final MyTableModel tableModel = (MyTableModel)myTable.getModel(); boolean changes = false; for (final VirtualFile file : files) { if (file != null) { tableModel.addTableItem(new TableItem(file)); changes = true; } } if (changes) { saveData(); TableUtil.selectRows(myTable, new int[]{tableModel.getRowCount() - 1}); } }