Aborts the currently running macro or any plugin using IJ.run().
()
| 65 | |
| 66 | /** Aborts the currently running macro or any plugin using IJ.run(). */ |
| 67 | public static void abort() { |
| 68 | //IJ.log("Abort: "+Thread.currentThread().getName()); |
| 69 | abort = true; |
| 70 | if (Thread.currentThread().getName().endsWith("Macro$")) { |
| 71 | table.remove(Thread.currentThread()); |
| 72 | throw new RuntimeException(MACRO_CANCELED); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | /** If a command started using run(name, options) is running, |
| 77 | and the current thread is the same thread, |
no test coverage detected