Skip to content

Commit 6233e1f

Browse files
author
Alberto Iannaccone
authored
[ATL-493] Support platforms installed in directories.user
1 parent 2cb9889 commit 6233e1f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

arduino-ide-extension/src/browser/contributions/board-selection.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,14 @@ PID: ${PID}`;
178178

179179
// Installed boards
180180
for (const board of installedBoards) {
181-
const { packageId, packageName, fqbn, name } = board;
181+
const { packageId, packageName, fqbn, name, manuallyInstalled } = board;
182182

183+
const packageLabel =
184+
packageName + `${manuallyInstalled ? ' (in Sketchbook)' : ''}`;
183185
// Platform submenu
184186
const platformMenuPath = [...boardsPackagesGroup, packageId];
185187
// Note: Registering the same submenu twice is a noop. No need to group the boards per platform.
186-
this.menuModelRegistry.registerSubmenu(platformMenuPath, packageName);
188+
this.menuModelRegistry.registerSubmenu(platformMenuPath, packageLabel);
187189

188190
const id = `arduino-select-board--${fqbn}`;
189191
const command = { id };

arduino-ide-extension/src/common/protocol/boards-service.ts

+2
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ export interface Board {
345345
export interface BoardWithPackage extends Board {
346346
readonly packageName: string;
347347
readonly packageId: string;
348+
readonly manuallyInstalled: boolean;
348349
}
349350
export namespace BoardWithPackage {
350351
export function is(
@@ -527,6 +528,7 @@ export namespace Board {
527528
packageName: string;
528529
packageId: string;
529530
details?: string;
531+
manuallyInstalled: boolean;
530532
}>;
531533
export function decorateBoards(
532534
selectedBoard: Board | undefined,

arduino-ide-extension/src/node/boards-service-impl.ts

+1
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ export class BoardsServiceImpl
233233
fqbn: board.getFqbn(),
234234
packageId: platform.getId(),
235235
packageName: platform.getName(),
236+
manuallyInstalled: platform.getManuallyInstalled(),
236237
});
237238
}
238239
}

0 commit comments

Comments
 (0)