Skip to content

Commit 27a46a4

Browse files
committed
Now it's working
Signed-off-by: Günter Neiß <[email protected]>
1 parent e295573 commit 27a46a4

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

arduino-ide-extension/src/browser/contributions/boards-data-menu-updater.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import { inject, injectable } from '@theia/core/shared/inversify';
77
import PQueue from 'p-queue';
88
import {
99
BoardIdentifier,
10-
// Produces Error: src/browser/contributions/boards-data-menu-updater.ts(10,3): error TS6133: 'ConfigOption' is declared but its value is never read.
11-
// ConfigOption,
1210
isBoardIdentifierChangeEvent,
1311
Programmer,
1412
} from '../../common/protocol';
@@ -72,8 +70,11 @@ export class BoardsDataMenuUpdater extends Contribution {
7270
...ArduinoMenus.TOOLS__BOARD_SETTINGS_GROUP,
7371
'z01_boardsConfig',
7472
]; // `z_` is for ordering.
75-
for (const { label, option, values } of configOptions ) {
76-
const menuPath = [...boardsConfigMenuPath, `${option}`];
73+
let i:number = 0;
74+
for (const { label, option, values } of configOptions) {
75+
// We want Menu Entries in order of configOptions
76+
const order = String(i++).padStart(4)
77+
const menuPath = [...boardsConfigMenuPath, `${order}`];
7778
const commands = new Map<
7879
string,
7980
Disposable & { label: string }

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

-6
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,6 @@ export namespace ConfigOption {
377377
Object.setPrototypeOf(this, ConfigOptionError.prototype);
378378
}
379379
}
380-
381-
export const LABEL_COMPARATOR = (left: ConfigOption, right: ConfigOption) =>
382-
naturalCompare(
383-
left.label.toLocaleLowerCase(),
384-
right.label.toLocaleLowerCase()
385-
);
386380
}
387381

388382
export interface ConfigValue {

0 commit comments

Comments
 (0)