Skip to content

Commit 0f06e30

Browse files
committed
Removed unused code
1 parent df23af5 commit 0f06e30

File tree

1 file changed

+8
-27
lines changed

1 file changed

+8
-27
lines changed

app/src/processing/app/Base.java

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,31 +1195,13 @@ public void rebuildBoardsMenu(JMenu toolsMenu, final Editor editor) {
11951195

11961196
// For every platform cycle through all boards
11971197
for (final String boardID : targetPlatform.getBoards().keySet()) {
1198-
1199-
// PreferencesMap boardAttributes = boards.get(boardID);
1200-
// AbstractAction action = new AbstractAction(boardAttributes.get("name")) {
1201-
//
1202-
// @Override
1203-
// public void actionPerformed(ActionEvent e) {
1204-
// Preferences.set("target_package", (String) getValue("package"));
1205-
// Preferences.set("target_platform", (String) getValue("platform"));
1206-
// Preferences.set("board", (String) getValue("board"));
1207-
//
1208-
// filterVisibilityOfSubsequentBoardMenus((String) getValue("board"), 1);
1209-
//
1210-
// onBoardOrPortChange();
1211-
// Sketch.buildSettingChanged();
1212-
// rebuildImportMenu(Editor.importMenu, editor);
1213-
// rebuildExamplesMenu(Editor.examplesMenu);
1214-
//=======
12151198
// Setup a menu item for the current board
12161199
String boardName = boards.get(boardID).get("name");
12171200
@SuppressWarnings("serial")
1218-
AbstractAction action = new AbstractAction(boardName) {
1201+
Action action = new AbstractAction(boardName) {
12191202
public void actionPerformed(ActionEvent actionevent) {
12201203
selectBoard((String) getValue("b"), editor);
12211204
}
1222-
12231205
};
12241206
action.putValue("b", packageName + ":" + platformName + ":" + boardID);
12251207

@@ -1242,8 +1224,8 @@ public void actionPerformed(ActionEvent actionevent) {
12421224
MapWithSubkeys boardCustomMenu = customMenu.get(boardID);
12431225
final int currentIndex = i + 1 + 1; //plus 1 to skip the first board menu, plus 1 to keep the custom menu next to this one
12441226
for (final String customMenuOption : boardCustomMenu.getKeys()) {
1245-
action = new AbstractAction(_(boardCustomMenu.getValueOf(customMenuOption))) {
1246-
1227+
@SuppressWarnings("serial")
1228+
Action subAction = new AbstractAction(_(boardCustomMenu.getValueOf(customMenuOption))) {
12471229
@Override
12481230
public void actionPerformed(ActionEvent e) {
12491231
Preferences.set("target_package", (String) getValue("package"));
@@ -1259,17 +1241,16 @@ public void actionPerformed(ActionEvent e) {
12591241
rebuildExamplesMenu(Editor.examplesMenu);
12601242
}
12611243
};
1262-
action.putValue("properties", boardCustomMenu.getValues());
1263-
action.putValue("board", boardID);
1264-
action.putValue("custom_menu_option", customMenuOption);
1265-
action.putValue("package", packageName);
1266-
action.putValue("platform", platformName);
1244+
subAction.putValue("board", boardID);
1245+
subAction.putValue("custom_menu_option", customMenuOption);
1246+
subAction.putValue("package", packageName);
1247+
subAction.putValue("platform", platformName);
12671248

12681249
if (!buttonGroupsMap.containsKey(customMenuID)) {
12691250
buttonGroupsMap.put(customMenuID, new ButtonGroup());
12701251
}
12711252

1272-
item = new JRadioButtonMenuItem(action);
1253+
item = new JRadioButtonMenuItem(subAction);
12731254
menu.add(item);
12741255
buttonGroupsMap.get(customMenuID).add(item);
12751256

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy