Skip to content

Commit ad76045

Browse files
author
Akos Kitta
committed
Skip loading extensions for the Theia about dialog
It's unused in IDE2. Signed-off-by: Akos Kitta <[email protected]>
1 parent 71bbeda commit ad76045

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ import { EditorNavigationContribution } from './theia/editor/editor-navigation-c
277277
import { EditorNavigationContribution as TheiaEditorNavigationContribution } from '@theia/editor/lib/browser/editor-navigation-contribution';
278278
import { PreferenceTreeGenerator } from './theia/preferences/preference-tree-generator';
279279
import { PreferenceTreeGenerator as TheiaPreferenceTreeGenerator } from '@theia/preferences/lib/browser/util/preference-tree-generator';
280+
import { AboutDialog } from './theia/core/about-dialog';
281+
import { AboutDialog as TheiaAboutDialog } from '@theia/core/lib/browser/about-dialog';
280282

281283
MonacoThemingService.register({
282284
id: 'arduino-theme',
@@ -687,9 +689,14 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
687689
EditorNavigationContribution
688690
);
689691

690-
bind(PreferenceTreeGenerator).toSelf().inSingletonScope()
692+
// IDE2 does not use the Theia preferences widget, no need to create and sync the underlying tree model.
693+
bind(PreferenceTreeGenerator).toSelf().inSingletonScope();
691694
rebind(TheiaPreferenceTreeGenerator).toService(PreferenceTreeGenerator);
692695

696+
// IDE2 has a custom about dialog, so there is no need to load the Theia extensions on FE load
697+
bind(AboutDialog).toSelf().inSingletonScope();
698+
rebind(TheiaAboutDialog).toService(AboutDialog);
699+
693700
// To avoid running `Save All` when there are no dirty editors before starting the debug session.
694701
bind(DebugSessionManager).toSelf().inSingletonScope();
695702
rebind(TheiaDebugSessionManager).toService(DebugSessionManager);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { AboutDialog as TheiaAboutDialog } from '@theia/core/lib/browser/about-dialog';
2+
import { duration } from '../../../common/decorators';
3+
4+
export class AboutDialog extends TheiaAboutDialog {
5+
@duration({ name: 'theia-about#init' })
6+
protected override async init(): Promise<void> {
7+
// NOOP
8+
// IDE2 has a custom about dialog, so it does not make sense to collect Theia extensions at startup time.
9+
}
10+
}

0 commit comments

Comments
 (0)