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

Method installToolsetTool

ij/src/main/java/ij/gui/Toolbar.java:2039–2050  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

2037
2038 // install tool from ImageJ/macros/toolsets
2039 private boolean installToolsetTool(String name) {
2040 String path = IJ.getDir("macros")+"toolsets"+File.separator+name+".ijm";
2041 if (!((new File(path)).exists())) {
2042 name = name.replaceAll(" ", "_");
2043 path = IJ.getDir("macros")+"toolsets"+File.separator+name+".ijm";
2044 }
2045 String text = IJ.openAsString(path);
2046 if (text==null || text.startsWith("Error"))
2047 return false;
2048 new MacroInstaller().installSingleTool(text);
2049 return true;
2050 }
2051
2052 private boolean installBuiltinTool(String label) {
2053 if (IJ.debugMode) IJ.log("Toolbar.installBuiltinTool: "+label);

Callers 1

installStartupToolsMethod · 0.95

Calls 6

getDirMethod · 0.95
openAsStringMethod · 0.95
replaceAllMethod · 0.80
startsWithMethod · 0.80
installSingleToolMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected