File tree 2 files changed +5
-10
lines changed
arduino-ide-extension/src
2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ import { inject, injectable } from '@theia/core/shared/inversify';
7
7
import PQueue from 'p-queue' ;
8
8
import {
9
9
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,
12
10
isBoardIdentifierChangeEvent ,
13
11
Programmer ,
14
12
} from '../../common/protocol' ;
@@ -72,8 +70,11 @@ export class BoardsDataMenuUpdater extends Contribution {
72
70
...ArduinoMenus . TOOLS__BOARD_SETTINGS_GROUP ,
73
71
'z01_boardsConfig' ,
74
72
] ; // `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 } ` ] ;
77
78
const commands = new Map <
78
79
string ,
79
80
Disposable & { label : string }
Original file line number Diff line number Diff line change @@ -377,12 +377,6 @@ export namespace ConfigOption {
377
377
Object . setPrototypeOf ( this , ConfigOptionError . prototype ) ;
378
378
}
379
379
}
380
-
381
- export const LABEL_COMPARATOR = ( left : ConfigOption , right : ConfigOption ) =>
382
- naturalCompare (
383
- left . label . toLocaleLowerCase ( ) ,
384
- right . label . toLocaleLowerCase ( )
385
- ) ;
386
380
}
387
381
388
382
export interface ConfigValue {
You can’t perform that action at this time.
0 commit comments