File tree 1 file changed +18
-3
lines changed
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -1200,21 +1200,36 @@ public void rebuildExamplesMenu(JMenu menu) {
1200
1200
menu .removeAll ();
1201
1201
1202
1202
// Add examples from distribution "example" folder
1203
+ JMenuItem label = new JMenuItem (tr ("Built-in Examples" ));
1204
+ label .setEnabled (false );
1205
+ menu .add (label );
1203
1206
boolean found = addSketches (menu , BaseNoGui .getExamplesFolder ());
1204
- if (found ) menu .addSeparator ();
1207
+ if (found ) {
1208
+ menu .addSeparator ();
1209
+ }
1205
1210
1206
1211
// Add examples from libraries
1207
1212
LibraryList ideLibs = getIDELibs ();
1208
1213
ideLibs .sort ();
1209
- for (UserLibrary lib : ideLibs )
1214
+ if (!ideLibs .isEmpty ()) {
1215
+ label = new JMenuItem (tr ("Examples from Libraries" ));
1216
+ label .setEnabled (false );
1217
+ menu .add (label );
1218
+ }
1219
+ for (UserLibrary lib : ideLibs ) {
1210
1220
addSketchesSubmenu (menu , lib );
1221
+ }
1211
1222
1212
1223
LibraryList userLibs = getUserLibs ();
1213
1224
if (userLibs .size () > 0 ) {
1214
1225
menu .addSeparator ();
1215
1226
userLibs .sort ();
1216
- for (UserLibrary lib : userLibs )
1227
+ label = new JMenuItem (tr ("Examples from Custom Libraries" ));
1228
+ label .setEnabled (false );
1229
+ menu .add (label );
1230
+ for (UserLibrary lib : userLibs ) {
1217
1231
addSketchesSubmenu (menu , lib );
1232
+ }
1218
1233
}
1219
1234
}
1220
1235
You can’t perform that action at this time.
0 commit comments