MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / abortPluginOrMacro

Method abortPluginOrMacro

ij/src/main/java/ij/ImageJ.java:737–755  ·  view source on GitHub ↗

called when escape pressed

(ImagePlus imp)

Source from the content-addressed store, hash-verified

735
736 /** called when escape pressed */
737 void abortPluginOrMacro(ImagePlus imp) {
738 if (imp!=null) {
739 ImageWindow win = imp.getWindow();
740 if (win!=null) {
741 Roi roi = imp.getRoi();
742 if (roi!=null && roi.getState()!=Roi.NORMAL) {
743 roi.abortModification(imp);
744 return;
745 } else {
746 win.running = false;
747 win.running2 = false;
748 }
749 }
750 }
751 Macro.abort();
752 Interpreter.abort();
753 if (Interpreter.getInstance()!=null)
754 IJ.beep();
755 }
756
757 public void windowClosing(WindowEvent e) {
758 if (Executer.getListenerCount()>0)

Callers 1

keyPressedMethod · 0.95

Calls 8

getStateMethod · 0.95
abortModificationMethod · 0.95
abortMethod · 0.95
abortMethod · 0.95
getInstanceMethod · 0.95
beepMethod · 0.95
getWindowMethod · 0.45
getRoiMethod · 0.45

Tested by

no test coverage detected