Skip to content

Commit f524bb2

Browse files
authored
Update GLSPEditorRegistry.java (#75)
1 parent af77f57 commit f524bb2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

server/plugins/org.eclipse.glsp.ide.editor/src/org/eclipse/glsp/ide/editor/GLSPEditorRegistry.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ public GLSPDiagramEditor getGLSPEditorOrThrow(final String clientId) {
8282
"Could not retrieve GLSP Editor. GLSP editor is not properly configured for clientId: " + clientId);
8383
}
8484

85-
private synchronized void partClosed(final IWorkbenchPartReference part) {
85+
private void partClosed(final IWorkbenchPartReference part) {
8686
if (part.getPart(false) instanceof GLSPDiagramEditor) {
8787
GLSPDiagramEditor editor = (GLSPDiagramEditor) part.getPart(false);
8888
editor.notifyAboutToBeDisposed();
89-
clientIdtoDiagramEditor.remove(editor.getClientId());
89+
removeDiagramEditor(editor.getClientId());
9090
}
9191
}
9292

@@ -96,6 +96,10 @@ private synchronized void partOpened(final IWorkbenchPartReference part) {
9696
clientIdtoDiagramEditor.put(editor.getClientId(), editor);
9797
}
9898
}
99+
100+
private synchronized void removeDiagramEditor(final String clientID) {
101+
clientIdtoDiagramEditor.remove(clientID);
102+
}
99103

100104
class GLSPDiagramEditorPartListener implements IPartListener2 {
101105
@Override

0 commit comments

Comments
 (0)