Skip to content

Commit

Permalink
GLSP-960: Follow-up
Browse files Browse the repository at this point in the history
Adapt to latest client changes
Part of eclipse-glsp/glsp/issues/960
Requires eclipse-glsp/glsp-client#282
  • Loading branch information
tortmayr committed Sep 4, 2023
1 parent b79696c commit 1c59885
Show file tree
Hide file tree
Showing 4 changed files with 353 additions and 348 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
********************************************************************************/

import { ModuleConfiguration } from '@eclipse-glsp/client';
import { theiaExportModule } from './export/theia-export-module';
import { theiaNavigationModule } from './navigation/theia-navigation-module';
import { theiaNotificationModule } from './notification-module/notification-module';
Expand All @@ -27,3 +28,7 @@ export const THEIA_DEFAULT_MODULES = [
theiaSourceModelWatcherModule,
theiaNotificationModule
] as const;

export const THEIA_DEFAULT_MODULE_CONFIG: ModuleConfiguration = {
add: [...THEIA_DEFAULT_MODULES]
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import { ContainerConfiguration, IDiagramOptions, InstanceRegistry, createDiagramOptionsModule } from '@eclipse-glsp/client';
import { Container, ContainerModule, inject, injectable, multiInject, optional } from '@theia/core/shared/inversify';
import { TheiaContextMenuService } from '../theia-glsp-context-menu-service';
import { THEIA_DEFAULT_MODULES } from './features/default-modules';
import { THEIA_DEFAULT_MODULE_CONFIG } from './features/default-modules';
import { TheiaContextMenuServiceFactory, connectTheiaContextMenuService } from './theia-context-menu-service';
import { TheiaMarkerManager, TheiaMarkerManagerFactory, connectTheiaMarkerManager } from './theia-marker-manager';

Expand Down Expand Up @@ -92,7 +92,7 @@ export abstract class GLSPDiagramConfiguration implements DiagramConfiguration {
* @returns the container configuration
*/
protected getContainerConfiguration(): ContainerConfiguration {
return [...THEIA_DEFAULT_MODULES];
return [THEIA_DEFAULT_MODULE_CONFIG];
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export class GLSPDiagramWidget extends BaseWidget implements SaveableSource, Sta

const loader = this.diContainer.get(DiagramLoader);

return loader.load(this.requestModelOptions);
return loader.load({ requestModelOptions: this.requestModelOptions });
}

protected getBoundsInPage(element: Element): Bounds {
Expand Down
Loading

0 comments on commit 1c59885

Please sign in to comment.