mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Examples menu: added group title. Fixes #3725
This commit is contained in:
parent
6128dace42
commit
de8fcc9eb0
@ -1200,21 +1200,36 @@ public class Base {
|
||||
menu.removeAll();
|
||||
|
||||
// Add examples from distribution "example" folder
|
||||
JMenuItem label = new JMenuItem(tr("Built-in Examples"));
|
||||
label.setEnabled(false);
|
||||
menu.add(label);
|
||||
boolean found = addSketches(menu, BaseNoGui.getExamplesFolder());
|
||||
if (found) menu.addSeparator();
|
||||
if (found) {
|
||||
menu.addSeparator();
|
||||
}
|
||||
|
||||
// Add examples from libraries
|
||||
LibraryList ideLibs = getIDELibs();
|
||||
ideLibs.sort();
|
||||
for (UserLibrary lib : ideLibs)
|
||||
if (!ideLibs.isEmpty()) {
|
||||
label = new JMenuItem(tr("Examples from Libraries"));
|
||||
label.setEnabled(false);
|
||||
menu.add(label);
|
||||
}
|
||||
for (UserLibrary lib : ideLibs) {
|
||||
addSketchesSubmenu(menu, lib);
|
||||
}
|
||||
|
||||
LibraryList userLibs = getUserLibs();
|
||||
if (userLibs.size() > 0) {
|
||||
menu.addSeparator();
|
||||
userLibs.sort();
|
||||
for (UserLibrary lib : userLibs)
|
||||
label = new JMenuItem(tr("Examples from Custom Libraries"));
|
||||
label.setEnabled(false);
|
||||
menu.add(label);
|
||||
for (UserLibrary lib : userLibs) {
|
||||
addSketchesSubmenu(menu, lib);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user