void abortPluginOrMacro(ImagePlus imp) { if (imp != null) { ImageWindow win = imp.getWindow(); if (win != null) { win.running = false; win.running2 = false; } } Macro.abort(); Interpreter.abort(); if (Interpreter.getInstance() != null) IJ.beep(); }
/** Returns true if the user clicked on "Cancel". */ public boolean wasCanceled() { if (wasCanceled) Macro.abort(); return wasCanceled; }