// - Action code -----------------------------------------------------------
// -------------------------------------------------------------------------
@Override
public void performAction() {
FileSet selectedFiles;
// Retrieves the current selection.
selectedFiles = mainFrame.getActiveTable().getSelectedFiles();
// If no files are either selected or marked, aborts.
if(selectedFiles.size() == 0)
return;
// If we're working with local files, go ahead and runs the command.
if(selectedFiles.getBaseFolder().getURL().getScheme().equals(FileProtocols.FILE) && (selectedFiles.getBaseFolder().hasAncestor(LocalFile.class))) {
try {ProcessRunner.execute(command.getTokens(selectedFiles), selectedFiles.getBaseFolder());}
catch(Exception e) {
InformationDialog.showErrorDialog(mainFrame);
LOGGER.debug("Failed to execute command: " + command.getCommand(), e);
}