Skip to content

Commit

Permalink
GLSP-849: Remove theia-glsp-connector (#173)
Browse files Browse the repository at this point in the history
* GLSP-849: Remove theia-glsp-connector

Switch to new `GLSPModelSource` Instead of `TheiaGLSPDiagramServer´. With this migration we also remove the concept of
the `TheiaGLSPConnector`. It is no longe needed since all diagram containers are child containers  of the Theia main container and have direct access to all Theia services.

Refactors theia specifc GLSP customiizations/extensions into feature modules similar to how we handle it for the standalone usecase. This appraoch is now possible because the diagram container is a real child container of the Theia main container which means we have access to all Theia services.
This includes
 - Refactoring/Renaming of the `SaveableGLSPModelSource` to`GLSPSaveable`. The saveable implementation listens to the `onDirtyStateChanged` event from the  diagram `EditorContextService`
- Move Theia export svg functionality from connector to dedicated `theiaExportModule`
- Move forwarding to Theia selection service into dedicated `theiaSelectModule`
- Move the Theia source model changed handler into dediacted `theiaSourceModelWatcherModule`
- Move  handling of external navigation targets into dedicated `theiaNavigationModule`
- Load the Theia default feature modules in the `GLSPTheiaDiagramConfiguration`
- Move server message & process handling into dedicated `notificationModule`
  -- Remove `GlspNotificationManager` customization as its no longer needed

Another advantage of moving those bindings directly into the child contain is the multi-editor support (i.e. multiple registered GLSP  editors in one instance). Previously lots of the services (like TheiaSourceModelChangedHandler) would be shared between editor implementations. Now each implementation maintains its own set of services and can customize/rebind them as needed.

Fixes eclipse-glsp/glsp#849
Part of eclipse-glsp/glsp#900
Part of eclipse-glsp/glsp/issues/850

Requires eclipse-glsp/glsp-client#272
  • Loading branch information
tortmayr authored Aug 8, 2023
1 parent 43cd793 commit 591932b
Show file tree
Hide file tree
Showing 29 changed files with 1,000 additions and 1,453 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import { initializeWorkflowDiagramContainer } from '@eclipse-glsp-examples/workflow-glsp/lib';
import { ContainerConfiguration } from '@eclipse-glsp/client';
import { configureDiagramServer, GLSPDiagramConfiguration, GLSPTheiaDiagramServer } from '@eclipse-glsp/theia-integration';
import { GLSPDiagramConfiguration } from '@eclipse-glsp/theia-integration';
import { Container, injectable } from '@theia/core/shared/inversify';

import { WorkflowLanguage } from '../../common/workflow-language';
Expand All @@ -27,7 +27,6 @@ export class WorkflowDiagramConfiguration extends GLSPDiagramConfiguration {

configureContainer(container: Container, widgetId: string, ...containerConfiguration: ContainerConfiguration): Container {
initializeWorkflowDiagramContainer(container, widgetId, ...containerConfiguration);
configureDiagramServer(container, GLSPTheiaDiagramServer);
return container;
}
}
31 changes: 0 additions & 31 deletions packages/theia-integration/css/diagram.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,6 @@
font-weight: bold;
}

/*Status div */

.sprotty-status {
position: absolute;
top: 5px;
left: 10px;
display: flex;
align-items: center;
}

.sprotty-status .fatal {
color: var(--theia-inputValidation-errorBorder);
}
Expand Down Expand Up @@ -164,24 +154,3 @@
fill: var(--theia-info-color0);
color: var(--theia-inputValidation-infoBackground);
}

.sprotty-infoRow .codicon {
margin-right: 8px;
}
.sprotty-status .ok {
visibility: hidden;
}

.sprotty-status-message {
visibility: hidden;
padding-left: 10px;
}

.sprotty-status-message.fatal {
visibility: visible;
padding-left: 10px;
}

.sprotty-status:hover .sprotty-status-message {
visibility: visible;
}
Loading

0 comments on commit 591932b

Please sign in to comment.