Speed up IDE startup time.

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta
2022-05-20 12:11:23 +02:00
committed by Akos Kitta
parent cb50d3a70d
commit 4c55807392
179 changed files with 2692 additions and 2022 deletions

View File

@@ -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;
}
}

View File

@@ -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);
}
}