@@ -265,17 +265,12 @@ import {
265
265
} from './dialogs/user-fields/user-fields-dialog' ;
266
266
import { nls } from '@theia/core/lib/common' ;
267
267
import { IDEUpdaterCommands } from './ide-updater/ide-updater-commands' ;
268
- import {
269
- IDEUpdater ,
270
- IDEUpdaterClient ,
271
- IDEUpdaterPath ,
272
- } from '../common/protocol/ide-updater' ;
268
+ import { IDEUpdater , IDEUpdaterClient } from '../common/protocol/ide-updater' ;
273
269
import { IDEUpdaterClientImpl } from './ide-updater/ide-updater-client-impl' ;
274
270
import {
275
271
IDEUpdaterDialog ,
276
272
IDEUpdaterDialogProps ,
277
273
} from './dialogs/ide-updater/ide-updater-dialog' ;
278
- import { ElectronIpcConnectionProvider } from '@theia/core/lib/electron-browser/messaging/electron-ipc-connection-provider' ;
279
274
import { MonitorModel } from './monitor-model' ;
280
275
import { MonitorManagerProxyClientImpl } from './monitor-manager-proxy-client-impl' ;
281
276
import { EditorManager as TheiaEditorManager } from '@theia/editor/lib/browser/editor-manager' ;
@@ -295,10 +290,7 @@ import { PreferenceTreeGenerator } from './theia/preferences/preference-tree-gen
295
290
import { PreferenceTreeGenerator as TheiaPreferenceTreeGenerator } from '@theia/preferences/lib/browser/util/preference-tree-generator' ;
296
291
import { AboutDialog } from './theia/core/about-dialog' ;
297
292
import { AboutDialog as TheiaAboutDialog } from '@theia/core/lib/browser/about-dialog' ;
298
- import {
299
- SurveyNotificationService ,
300
- SurveyNotificationServicePath ,
301
- } from '../common/protocol/survey-service' ;
293
+ import { SurveyNotificationService } from '../common/protocol/survey-service' ;
302
294
import { WindowContribution } from './theia/core/window-contribution' ;
303
295
import { WindowContribution as TheiaWindowContribution } from '@theia/core/lib/browser/window-contribution' ;
304
296
import { CoreErrorHandler } from './contributions/core-error-handler' ;
@@ -394,6 +386,8 @@ import {
394
386
VersionWelcomeDialog ,
395
387
VersionWelcomeDialogProps ,
396
388
} from './dialogs/version-welcome-dialog' ;
389
+ import { DialogService } from './dialog-service' ;
390
+ import { AppInfo , AppService } from './app-service' ;
397
391
398
392
// Hack to fix copy/cut/paste issue after electron version update in Theia.
399
393
// https://github.com/eclipse-theia/theia/issues/12487
@@ -574,14 +568,15 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
574
568
WorkspaceVariableContribution
575
569
) ;
576
570
577
- bind ( SurveyNotificationService )
578
- . toDynamicValue ( ( context ) => {
579
- return ElectronIpcConnectionProvider . createProxy (
580
- context . container ,
581
- SurveyNotificationServicePath
582
- ) ;
583
- } )
584
- . inSingletonScope ( ) ;
571
+ bind ( SurveyNotificationService ) . toConstantValue (
572
+ { } as SurveyNotificationService
573
+ ) ;
574
+ // return ElectronIpcConnectionProvider.createProxy(
575
+ // context.container,
576
+ // SurveyNotificationServicePath
577
+ // );
578
+ // })
579
+ // .inSingletonScope();
585
580
586
581
// Layout and shell customizations.
587
582
rebind ( TheiaOutlineViewContribution )
@@ -1039,16 +1034,16 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
1039
1034
// Frontend binding for the IDE Updater service
1040
1035
bind ( IDEUpdaterClientImpl ) . toSelf ( ) . inSingletonScope ( ) ;
1041
1036
bind ( IDEUpdaterClient ) . toService ( IDEUpdaterClientImpl ) ;
1042
- bind ( IDEUpdater )
1043
- . toDynamicValue ( ( context ) => {
1044
- const client = context . container . get ( IDEUpdaterClientImpl ) ;
1045
- return ElectronIpcConnectionProvider . createProxy (
1046
- context . container ,
1047
- IDEUpdaterPath ,
1048
- client
1049
- ) ;
1050
- } )
1051
- . inSingletonScope ( ) ;
1037
+ bind ( IDEUpdater ) . toConstantValue ( { } as IDEUpdater ) ;
1038
+ // .toDynamicValue((context) => {
1039
+ // const client = context.container.get(IDEUpdaterClientImpl);
1040
+ // return ElectronIpcConnectionProvider.createProxy(
1041
+ // context.container,
1042
+ // IDEUpdaterPath,
1043
+ // client
1044
+ // );
1045
+ // })
1046
+ // .inSingletonScope();
1052
1047
1053
1048
bind ( HostedPluginSupportImpl ) . toSelf ( ) . inSingletonScope ( ) ;
1054
1049
bind ( HostedPluginSupport ) . toService ( HostedPluginSupportImpl ) ;
@@ -1113,6 +1108,32 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
1113
1108
) ;
1114
1109
1115
1110
bindViewsWelcome_TheiaGH14309 ( { bind, widget : TreeViewWidget } ) ;
1111
+
1112
+ bind ( DialogService ) . toConstantValue ( < DialogService > { } ) ;
1113
+ bind ( AppService ) . toConstantValue ( < AppService > {
1114
+ quit ( ) {
1115
+ console . log ( 'Quitting application...' ) ;
1116
+ // Implement quit logic here
1117
+ } ,
1118
+ async info ( ) {
1119
+ return {
1120
+ name : 'MyApp' ,
1121
+ version : '1.0.0' ,
1122
+ description : 'An example application' ,
1123
+ appVersion : '1.0.0' ,
1124
+ cliVersion : '1.0.0' ,
1125
+ buildDate : new Date ( ) . toISOString ( ) ,
1126
+ } as AppInfo ;
1127
+ } ,
1128
+ registerStartupTasksHandler ( _ ) {
1129
+ console . log ( 'registerStartupTasksHandler' , _ ) ;
1130
+ return { dispose : ( ) => { } } ;
1131
+ } ,
1132
+ scheduleDeletion ( _ ) {
1133
+ console . log ( `Scheduled deletion for sketch}` , _ ) ;
1134
+ // Implement deletion logic
1135
+ } ,
1136
+ } ) ;
1116
1137
} ) ;
1117
1138
1118
1139
// Align the viewsWelcome rendering with VS Code (https://github.com/eclipse-theia/theia/issues/14309)
0 commit comments