()
| 1634 | } |
| 1635 | |
| 1636 | private void installStartupMacros() { |
| 1637 | resetTools(); |
| 1638 | String path = IJ.getDir("macros")+"StartupMacros.txt"; |
| 1639 | File f = new File(path); |
| 1640 | if (!f.exists()) { |
| 1641 | path = IJ.getDir("macros")+"StartupMacros.ijm"; |
| 1642 | f = new File(path); |
| 1643 | } |
| 1644 | if (!f.exists()) { |
| 1645 | path = IJ.getDir("macros")+"StartupMacros.fiji.ijm"; |
| 1646 | f = new File(path); |
| 1647 | } |
| 1648 | if (!f.exists()) { |
| 1649 | IJ.error("StartupMacros not found in\n \n"+IJ.getDir("macros")); |
| 1650 | return; |
| 1651 | } |
| 1652 | if (IJ.shiftKeyDown()) { |
| 1653 | IJ.open(path); |
| 1654 | IJ.setKeyUp(KeyEvent.VK_SHIFT); |
| 1655 | } else { |
| 1656 | try { |
| 1657 | MacroInstaller mi = new MacroInstaller(); |
| 1658 | mi.installFile(path); |
| 1659 | } catch |
| 1660 | (Exception ex) {} |
| 1661 | } |
| 1662 | } |
| 1663 | |
| 1664 | public void actionPerformed(ActionEvent e) { |
| 1665 | MenuItem item = (MenuItem)e.getSource(); |
no test coverage detected