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

Method newMenu

ij/src/main/java/ij/macro/Functions.java:5004–5016  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5002 }
5003
5004 Variable[] newMenu() {
5005 String name = getFirstString();
5006 interp.getComma();
5007 String[] commands = getStringArray();
5008 interp.getRightParen();
5009 if (pgm.menus==null)
5010 pgm.menus = new Hashtable();
5011 pgm.menus.put(name, commands);
5012 Variable[] commands2 = new Variable[commands.length];
5013 for (int i=0; i<commands.length; i++)
5014 commands2[i] = new Variable(0, 0.0, commands[i]);
5015 return commands2;
5016 }
5017
5018 void setSelectionLocation() {
5019 int x = (int)Math.round(getFirstArg());

Callers 1

getArrayFunctionMethod · 0.95

Calls 5

getFirstStringMethod · 0.95
getStringArrayMethod · 0.95
getCommaMethod · 0.80
getRightParenMethod · 0.80
putMethod · 0.45

Tested by

no test coverage detected