mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Base.boardsCustomMenus is not a static any more
This commit is contained in:
parent
a053088691
commit
930289aa65
@ -91,7 +91,7 @@ public class Base {
|
|||||||
// these menus are shared so that the board and serial port selections
|
// these menus are shared so that the board and serial port selections
|
||||||
// are the same for all windows (since the board and serial port that are
|
// are the same for all windows (since the board and serial port that are
|
||||||
// actually used are determined by the preferences, which are shared)
|
// actually used are determined by the preferences, which are shared)
|
||||||
static List<JMenu> boardsCustomMenus;
|
private List<JMenu> boardsCustomMenus;
|
||||||
|
|
||||||
static public void main(String args[]) throws Exception {
|
static public void main(String args[]) throws Exception {
|
||||||
System.setProperty("awt.useSystemAAFontSettings", "on");
|
System.setProperty("awt.useSystemAAFontSettings", "on");
|
||||||
@ -1315,7 +1315,7 @@ public class Base {
|
|||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void filterVisibilityOfSubsequentBoardMenus(TargetBoard board,
|
private void filterVisibilityOfSubsequentBoardMenus(TargetBoard board,
|
||||||
int fromIndex) {
|
int fromIndex) {
|
||||||
for (int i = fromIndex; i < boardsCustomMenus.size(); i++) {
|
for (int i = fromIndex; i < boardsCustomMenus.size(); i++) {
|
||||||
JMenu menu = boardsCustomMenus.get(i);
|
JMenu menu = boardsCustomMenus.get(i);
|
||||||
@ -1801,7 +1801,7 @@ public class Base {
|
|||||||
return BaseNoGui.getBoardPreferences();
|
return BaseNoGui.getBoardPreferences();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<JMenu> getBoardsCustomMenus() {
|
public List<JMenu> getBoardsCustomMenus() {
|
||||||
return boardsCustomMenus;
|
return boardsCustomMenus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
fileMenu.insert(examplesMenu, 3);
|
fileMenu.insert(examplesMenu, 3);
|
||||||
sketchMenu.insert(importMenu, 4);
|
sketchMenu.insert(importMenu, 4);
|
||||||
int offset = 0;
|
int offset = 0;
|
||||||
for (JMenu menu : Base.getBoardsCustomMenus()) {
|
for (JMenu menu : base.getBoardsCustomMenus()) {
|
||||||
toolsMenu.insert(menu, numTools + offset);
|
toolsMenu.insert(menu, numTools + offset);
|
||||||
offset++;
|
offset++;
|
||||||
}
|
}
|
||||||
@ -205,7 +205,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
fileMenu.remove(sketchbookMenu);
|
fileMenu.remove(sketchbookMenu);
|
||||||
fileMenu.remove(examplesMenu);
|
fileMenu.remove(examplesMenu);
|
||||||
sketchMenu.remove(importMenu);
|
sketchMenu.remove(importMenu);
|
||||||
for (JMenu menu : Base.getBoardsCustomMenus()) {
|
for (JMenu menu : base.getBoardsCustomMenus()) {
|
||||||
toolsMenu.remove(menu);
|
toolsMenu.remove(menu);
|
||||||
}
|
}
|
||||||
toolsMenu.remove(serialMenu);
|
toolsMenu.remove(serialMenu);
|
||||||
@ -702,7 +702,7 @@ public class Editor extends JFrame implements RunnerListener {
|
|||||||
// XXX: DAM: these should probably be implemented using the Tools plugin
|
// XXX: DAM: these should probably be implemented using the Tools plugin
|
||||||
// API, if possible (i.e. if it supports custom actions, etc.)
|
// API, if possible (i.e. if it supports custom actions, etc.)
|
||||||
|
|
||||||
for (JMenu menu : Base.getBoardsCustomMenus()) {
|
for (JMenu menu : base.getBoardsCustomMenus()) {
|
||||||
toolsMenu.add(menu);
|
toolsMenu.add(menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user