File tree 3 files changed +15
-0
lines changed
arduino-core/src/processing/app/debug
3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1494,6 +1494,10 @@ public void actionPerformed(ActionEvent actionevent) {
1494
1494
if (platformLabel == null )
1495
1495
platformLabel = targetPackage .getId () + "-" + targetPlatform .getId ();
1496
1496
1497
+ // add an hint that this core lives in sketchbook
1498
+ if (targetPlatform .isInSketchbook ())
1499
+ platformLabel += " (in sketchbook)" ;
1500
+
1497
1501
JMenu platformBoardsMenu = new JMenu (platformLabel );
1498
1502
MenuScroller .setScrollerFor (platformBoardsMenu );
1499
1503
platformMenus .add (platformBoardsMenu );
Original file line number Diff line number Diff line change @@ -245,4 +245,9 @@ public String toString() {
245
245
res += " " + boardId + " = " + boards .get (boardId ) + "\n " ;
246
246
return res + "}" ;
247
247
}
248
+
249
+ @ Override
250
+ public boolean isInSketchbook () {
251
+ return getFolder ().getAbsolutePath ().startsWith (BaseNoGui .getDefaultSketchbookFolder ().getAbsolutePath ());
252
+ }
248
253
}
Original file line number Diff line number Diff line change @@ -94,4 +94,10 @@ public interface TargetPlatform {
94
94
*/
95
95
public TargetPackage getContainerPackage ();
96
96
97
+ /**
98
+ * Returns true if the platform is installed in a subfolder of the sketchbook
99
+ *
100
+ * @return
101
+ */
102
+ public boolean isInSketchbook ();
97
103
}
You can’t perform that action at this time.
0 commit comments