public boolean execute(PlugInContext context) throws Exception { reportNothingToUndoYet(context); layer = (Layer) context.getSelectedLayer(0); saveDatasetDialog.setLayer(layer); saveDatasetDialog.setVisible(true); return saveDatasetDialog.wasOKPressed(); }
public void run(TaskMonitor monitor, PlugInContext context) throws Exception { if (!saveDatasetDialog.wasOKPressed()) { return; } AbstractOutputDriver outputDriver = (AbstractOutputDriver) saveDatasetDialog.getCurrentDriver(); monitor.report("Saving " + layer.getName() + "..."); outputDriver.output(layer); }