public void actionPerformed(final ActionEvent e) {
final JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
chooser.setDialogTitle(TextUtils.getText("select_folder_for_importing"));
final ViewController viewController = Controller.getCurrentController().getViewController();
final int returnVal = chooser.showOpenDialog(viewController.getContentPane());
if (returnVal == JFileChooser.APPROVE_OPTION) {
final File folder = chooser.getSelectedFile();
viewController.out("Importing folder structure ...");
try {
importFolderStructure(folder, Controller.getCurrentModeController().getMapController().getSelectedNode(),
/*redisplay=*/true);
}
catch (final Exception ex) {
LogUtils.severe(ex);
}
viewController.out("Folder structure imported.");
}
}