Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLSP-1181: Fix support for simultaneously open diagrams #307

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Eclipse GLSP Client Changelog

## v2.10.0 - active
## v2.1.0 - active

### Changes

- [diagram] Fix a bug that prevented correct rendering of projection bars when using `GLSPProjectionView` [#298](https://github.com/eclipse-glsp/glsp-client/pull/298)
- [a11y] Improved responsibility and feedback when resizing or moving diagram elements with keyboard-only commands [#295](https://github.com/eclipse-glsp/glsp-client/pull/295)
- [diagram] Extends `configureDiagramOptions` function to also allow partial configuration of `ViewerOptions` [#296](https://github.com/eclipse-glsp/glsp-client/pull/296)
- [diagram] Remove unused handleSetContextActions from ToolPalette [#301](https://github.com/eclipse-glsp/glsp-client/pull/301)

### Breaking Changes
- [diagram] Deprecate `ISModelRootListener` API in favor of `IGModelRootListener` [#303](https://github.com/eclipse-glsp/glsp-client/pull/303)
- [diagram] Ensure that the suggestion container position of the `AutoCompleteWidget` is rendered correctly [#304](https://github.com/eclipse-glsp/glsp-client/pull/304)
- [feature] Extend `ToolPalette`/`CreateOperation` API to support rendering of preview/ghost elements when creating new nodes [#301](https://github.com/eclipse-glsp/glsp-client/pull/301)
- [protocol] Fix a bug in `BaseJsonRpcClient` to ensure that it can handle multiple open diagram sessions [#307](https://github.com/eclipse-glsp/glsp-client/pull/307)

## [v2.0.0 - 14/10/2023](https://github.com/eclipse-glsp/glsp-client/releases/tag/v2.0.0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ export class BaseJsonrpcGLSPClient implements GLSPClient {
return this.onServerInitializedEmitter.event;
}

protected onActionMessageNotificationEmitter = new Emitter<ActionMessage>();
protected get onActionMessageNotification(): Event<ActionMessage> {
return this.onActionMessageNotificationEmitter.event;
}

constructor(options: JsonrpcGLSPClient.Options) {
Object.assign(this, options);
this.state = ClientState.Initial;
Expand Down Expand Up @@ -66,7 +71,7 @@ export class BaseJsonrpcGLSPClient implements GLSPClient {
}

onActionMessage(handler: ActionMessageHandler, clientId?: string): Disposable {
return this.checkedConnection.onNotification(JsonrpcGLSPClient.ActionMessageNotification, msg => {
return this.onActionMessageNotification(msg => {
if (!clientId || msg.clientId === clientId) {
handler(msg);
}
Expand All @@ -91,6 +96,9 @@ export class BaseJsonrpcGLSPClient implements GLSPClient {
try {
this.state = ClientState.Starting;
const connection = await this.resolveConnection();
connection.onNotification(JsonrpcGLSPClient.ActionMessageNotification, msg =>
tortmayr marked this conversation as resolved.
Show resolved Hide resolved
this.onActionMessageNotificationEmitter.fire(msg)
);
connection.listen();
this.resolvedConnection = connection;
this.state = ClientState.Running;
Expand All @@ -113,6 +121,7 @@ export class BaseJsonrpcGLSPClient implements GLSPClient {
connection.dispose();
this.state = ClientState.Stopped;
this.onStop = undefined;
this.onActionMessageNotificationEmitter.dispose();
this.connectionPromise = undefined;
this.resolvedConnection = undefined;
}));
Expand Down
Loading