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

Method runMacro

ij/src/main/java/ij/macro/Interpreter.java:186–203  ·  view source on GitHub ↗

Interprets the specified tokenized macro starting at the specified location.

(Program pgm, int macroLoc, String macroName)

Source from the content-addressed store, hash-verified

184
185 /** Interprets the specified tokenized macro starting at the specified location. */
186 public void runMacro(Program pgm, int macroLoc, String macroName) {
187 calledMacro = true;
188 this.pgm = pgm;
189 this.macroName = macroName;
190 pc = macroLoc-1;
191 previousInstance = instance;
192 instance = this;
193 pushGlobals();
194 if (func==null)
195 func = new Functions(this, pgm);
196 func.plot = null;
197 if (macroLoc==0)
198 doStatements();
199 else
200 doBlock();
201 finishUp();
202 Recorder.recordInMacros = false;
203 }
204
205 /** Runs Process/Batch/ macros. */
206 public ImagePlus runBatchMacro(String macro, ImagePlus imp) {

Callers 1

runMethod · 0.95

Calls 4

pushGlobalsMethod · 0.95
doStatementsMethod · 0.95
doBlockMethod · 0.95
finishUpMethod · 0.95

Tested by

no test coverage detected