(String name)
| 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); |
no test coverage detected