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

Method installStartupMacroSet

ij/src/main/java/ij/Menus.java:1671–1698  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1669 }
1670
1671 void installStartupMacroSet() {
1672 if (macrosPath==null) {
1673 MacroInstaller.installFromJar("/macros/StartupMacros.txt");
1674 return;
1675 }
1676 String path = macrosPath + "StartupMacros.txt";
1677 File f = new File(path);
1678 if (!f.exists()) {
1679 path = macrosPath + "StartupMacros.ijm";
1680 f = new File(path);
1681 if (!f.exists()) {
1682 (new MacroInstaller()).installFromIJJar("/macros/StartupMacros.txt");
1683 return;
1684 }
1685 } else {
1686 if ("StartupMacros.fiji.ijm".equals(f.getName()))
1687 path = f.getPath();
1688 }
1689 String libraryPath = macrosPath + "Library.txt";
1690 f = new File(libraryPath);
1691 boolean isLibrary = f.exists();
1692 try {
1693 MacroInstaller mi = new MacroInstaller();
1694 if (isLibrary) mi.installLibrary(libraryPath);
1695 mi.installStartupMacros(path);
1696 nMacros += mi.getMacroCount();
1697 } catch (Exception e) {}
1698 }
1699
1700 static boolean validShortcut(String shortcut) {
1701 int len = shortcut.length();

Callers 2

ImageJMethod · 0.95
updateImageJMenusMethod · 0.95

Calls 9

installFromJarMethod · 0.95
installLibraryMethod · 0.95
installStartupMacrosMethod · 0.95
getMacroCountMethod · 0.95
installFromIJJarMethod · 0.80
getNameMethod · 0.65
existsMethod · 0.45
equalsMethod · 0.45
getPathMethod · 0.45

Tested by

no test coverage detected