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

Method run

ij/src/main/java/ij/plugin/Commands.java:27–58  ·  view source on GitHub ↗
(String cmd)

Source from the content-addressed store, hash-verified

25public class Commands implements PlugIn {
26
27 public void run(String cmd) {
28 if (cmd.equals("new")) {
29 if (IJ.altKeyDown())
30 IJ.runPlugIn("ij.plugin.HyperStackMaker", "");
31 else
32 new NewImage();
33 } else if (cmd.equals("open")) {
34 if (Prefs.useJFileChooser && !IJ.macroRunning())
35 new Opener().openMultiple();
36 else
37 new Opener().open();
38 } else if (cmd.equals("close"))
39 close();
40 else if (cmd.equals("close-all"))
41 closeAll();
42 else if (cmd.equals("save"))
43 save();
44 else if (cmd.equals("revert"))
45 revert();
46 else if (cmd.equals("undo"))
47 undo();
48 else if (cmd.equals("ij")) {
49 ImageJ ij = IJ.getInstance();
50 if (ij!=null) ij.toFront();
51 } else if (cmd.equals("tab"))
52 WindowManager.putBehind();
53 else if (cmd.equals("quit")) {
54 ImageJ ij = IJ.getInstance();
55 if (ij!=null) ij.quit();
56 } else if (cmd.equals("startup"))
57 openStartupMacros();
58 }
59
60 void revert() {
61 ImagePlus imp = WindowManager.getCurrentImage();

Callers

nothing calls this directly

Calls 15

altKeyDownMethod · 0.95
runPlugInMethod · 0.95
macroRunningMethod · 0.95
closeMethod · 0.95
closeAllMethod · 0.95
saveMethod · 0.95
revertMethod · 0.95
undoMethod · 0.95
getInstanceMethod · 0.95
putBehindMethod · 0.95
quitMethod · 0.95
openStartupMacrosMethod · 0.95

Tested by

no test coverage detected