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

Method run

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

Interprets the specified string.

(String macro)

Source from the content-addressed store, hash-verified

89
90 /** Interprets the specified string. */
91 public void run(String macro) {
92 if (additionalFunctions!=null) {
93 if (!(macro.endsWith("\n")|| additionalFunctions.startsWith("\n")))
94 macro = macro + "\n" + additionalFunctions;
95 else
96 macro = macro + additionalFunctions;
97 }
98 IJ.resetEscape();
99 Tokenizer tok = new Tokenizer();
100 Program pgm = tok.tokenize(macro);
101 if (pgm.hasVars && pgm.hasFunctions)
102 saveGlobals2(pgm);
103 run(pgm);
104 }
105
106 /** Runs the specified macro, passing it a string
107 * argument and returning a string value.

Callers 7

runMethod · 0.95
evalMethod · 0.95
runBatchMacroMethod · 0.95
runMacroMethod · 0.95
runMacroMethod · 0.95
applyMacroMethod · 0.95
applyMacroMethod · 0.95

Calls 9

resetEscapeMethod · 0.95
tokenizeMethod · 0.95
saveGlobals2Method · 0.95
getInstanceMethod · 0.95
setBatchModeMethod · 0.95
pushGlobalsMethod · 0.95
doStatementsMethod · 0.95
finishUpMethod · 0.95
startsWithMethod · 0.80

Tested by

no test coverage detected