@@ -13,6 +13,8 @@ import { FileService } from '@theia/filesystem/lib/browser/file-service';
13
13
import { ThemeService } from '@theia/core/lib/browser/theming' ;
14
14
import { MaybePromise } from '@theia/core/lib/common/types' ;
15
15
import { WindowService } from '@theia/core/lib/browser/window/window-service' ;
16
+ import { CommandRegistry } from "@theia/core" ;
17
+ import { CommonCommands } from '@theia/core/lib/browser/common-frontend-contribution' ;
16
18
import { FileDialogService } from '@theia/filesystem/lib/browser/file-dialog/file-dialog-service' ;
17
19
import { DisposableCollection } from '@theia/core/lib/common/disposable' ;
18
20
import { FrontendApplicationStateService } from '@theia/core/lib/browser/frontend-application-state' ;
@@ -376,9 +378,18 @@ export class SettingsComponent extends React.Component<SettingsComponent.Props,
376
378
onChange = { this . additionalUrlsDidChange } />
377
379
< i className = 'fa fa-window-restore theia-button shrink' onClick = { this . editAdditionalUrlDidClick } />
378
380
</ div >
381
+
382
+ < div className = 'flex-line' >
383
+ < button className = 'theia-button shrink' onClick = { this . openExtendedSettings } > Extended Settings</ button >
384
+ </ div >
379
385
</ div > ;
380
386
}
381
387
388
+ protected openExtendedSettings = ( e : React . MouseEvent < HTMLElement > ) => {
389
+ this . props . commands . executeCommand ( CommonCommands . OPEN_PREFERENCES . id ) ;
390
+ this . props . commands . executeCommand ( 'arduino-settings-close' ) ;
391
+ }
392
+
382
393
protected renderNetwork ( ) : React . ReactNode {
383
394
return < div className = 'content noselect' >
384
395
< form >
@@ -662,6 +673,7 @@ export namespace SettingsComponent {
662
673
readonly fileService : FileService ;
663
674
readonly fileDialogService : FileDialogService ;
664
675
readonly windowService : WindowService ;
676
+ readonly commands : CommandRegistry
665
677
}
666
678
export interface State extends Settings { }
667
679
}
@@ -681,12 +693,17 @@ export class SettingsWidget extends ReactWidget {
681
693
@inject ( WindowService )
682
694
protected readonly windowService : WindowService ;
683
695
696
+ @inject ( CommandRegistry )
697
+ protected readonly commands : CommandRegistry ;
698
+
684
699
protected render ( ) : React . ReactNode {
685
700
return < SettingsComponent
686
701
settingsService = { this . settingsService }
687
702
fileService = { this . fileService }
688
703
fileDialogService = { this . fileDialogService }
689
- windowService = { this . windowService } /> ;
704
+ windowService = { this . windowService }
705
+ commands = { this . commands }
706
+ /> ;
690
707
}
691
708
692
709
}
0 commit comments