mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-13 04:09:27 +00:00
Speed up IDE startup time.
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { CompositeTreeNode } from '@theia/core/lib/browser/tree/tree';
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
import { PreferenceTreeGenerator as TheiaPreferenceTreeGenerator } from '@theia/preferences/lib/browser/util/preference-tree-generator';
|
||||
|
||||
@injectable()
|
||||
export class PreferenceTreeGenerator extends TheiaPreferenceTreeGenerator {
|
||||
protected override async init(): Promise<void> {
|
||||
// The IDE2 does not use the default Theia preferences UI.
|
||||
// There is no need to create and keep the the tree model synchronized when there is no UI for it.
|
||||
}
|
||||
|
||||
// Just returns with the empty root.
|
||||
override generateTree(): CompositeTreeNode {
|
||||
this._root = this.createRootNode();
|
||||
return this._root;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import { PreferencesContribution as TheiaPreferencesContribution } from '@theia/
|
||||
|
||||
@injectable()
|
||||
export class PreferencesContribution extends TheiaPreferencesContribution {
|
||||
registerMenus(registry: MenuModelRegistry): void {
|
||||
override registerMenus(registry: MenuModelRegistry): void {
|
||||
super.registerMenus(registry);
|
||||
// The settings group: preferences, CLI config is not part of the `File` menu on macOS.
|
||||
// On Windows and Linux, we rebind it to `Preferences...`. It is safe to remove here.
|
||||
@@ -16,7 +16,7 @@ export class PreferencesContribution extends TheiaPreferencesContribution {
|
||||
);
|
||||
}
|
||||
|
||||
registerKeybindings(registry: KeybindingRegistry): void {
|
||||
override registerKeybindings(registry: KeybindingRegistry): void {
|
||||
registry.unregisterKeybinding(CommonCommands.OPEN_PREFERENCES.id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user