Skip to content

[ATL-493] Support platforms installed in directories.user #473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,14 @@ PID: ${PID}`;

// Installed boards
for (const board of installedBoards) {
const { packageId, packageName, fqbn, name } = board;
const { packageId, packageName, fqbn, name, manuallyInstalled } = board;

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

const id = `arduino-select-board--${fqbn}`;
const command = { id };
Expand Down
2 changes: 2 additions & 0 deletions arduino-ide-extension/src/common/protocol/boards-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ export interface Board {
export interface BoardWithPackage extends Board {
readonly packageName: string;
readonly packageId: string;
readonly manuallyInstalled: boolean;
}
export namespace BoardWithPackage {
export function is(
Expand Down Expand Up @@ -527,6 +528,7 @@ export namespace Board {
packageName: string;
packageId: string;
details?: string;
manuallyInstalled: boolean;
}>;
export function decorateBoards(
selectedBoard: Board | undefined,
Expand Down
1 change: 1 addition & 0 deletions arduino-ide-extension/src/node/boards-service-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ export class BoardsServiceImpl
fqbn: board.getFqbn(),
packageId: platform.getId(),
packageName: platform.getName(),
manuallyInstalled: platform.getManuallyInstalled(),
});
}
}
Expand Down