(TargetPlatform platform, List<JMenuItem> menus, ButtonGroup group)
| 1719 | } |
| 1720 | |
| 1721 | public void addProgrammersForPlatform(TargetPlatform platform, List<JMenuItem> menus, ButtonGroup group) { |
| 1722 | for (String programmer : platform.getProgrammers().keySet()) { |
| 1723 | String id = platform.getContainerPackage().getId() + ":" + programmer; |
| 1724 | |
| 1725 | @SuppressWarnings("serial") |
| 1726 | AbstractAction action = new AbstractAction(platform.getProgrammer(programmer).get("name")) { |
| 1727 | public void actionPerformed(ActionEvent actionevent) { |
| 1728 | PreferencesData.set("programmer", "" + getValue("id")); |
| 1729 | } |
| 1730 | }; |
| 1731 | action.putValue("id", id); |
| 1732 | JMenuItem item = new JRadioButtonMenuItem(action); |
| 1733 | if (PreferencesData.get("programmer").equals(id)) { |
| 1734 | item.setSelected(true); |
| 1735 | } |
| 1736 | group.add(item); |
| 1737 | menus.add(item); |
| 1738 | } |
| 1739 | } |
| 1740 | |
| 1741 | /** |
| 1742 | * Scan a folder recursively, and add any sketches found to the menu |
no test coverage detected