File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
arduino-core/src/processing/app/debug Expand file tree Collapse file tree 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) {
14941494 if (platformLabel == null )
14951495 platformLabel = targetPackage .getId () + "-" + targetPlatform .getId ();
14961496
1497+ // add an hint that this core lives in sketchbook
1498+ if (targetPlatform .isInSketchbook ())
1499+ platformLabel += " (sketchbook)" ;
1500+
14971501 JMenu platformBoardsMenu = new JMenu (platformLabel );
14981502 MenuScroller .setScrollerFor (platformBoardsMenu );
14991503 platformMenus .add (platformBoardsMenu );
Original file line number Diff line number Diff line change @@ -245,4 +245,9 @@ public String toString() {
245245 res += " " + boardId + " = " + boards .get (boardId ) + "\n " ;
246246 return res + "}" ;
247247 }
248+
249+ @ Override
250+ public boolean isInSketchbook () {
251+ return getFolder ().getAbsolutePath ().startsWith (BaseNoGui .getDefaultSketchbookFolder ().getAbsolutePath ());
252+ }
248253}
Original file line number Diff line number Diff line change @@ -94,4 +94,10 @@ public interface TargetPlatform {
9494 */
9595 public TargetPackage getContainerPackage ();
9696
97+ /**
98+ * Returns true if the platform is installed in a subfolder of the sketchbook
99+ *
100+ * @return
101+ */
102+ public boolean isInSketchbook ();
97103}
You can’t perform that action at this time.
0 commit comments