Skip to content

Commit

Permalink
[1844] Unload resources by default when the EMF based editing context…
Browse files Browse the repository at this point in the history
… is disposed

Bug: #1844
Signed-off-by: Stéphane Bégaudeau <stephane.begaudeau@obeo.fr>
  • Loading branch information
sbegaudeau committed Feb 7, 2024
1 parent e6b44ae commit 3acb3c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Expand Up @@ -70,6 +70,7 @@ image:doc/screenshots/deploymenDiagram.png[Deployment Diagram,70%]
- https://github.com/eclipse-sirius/sirius-web/issues/3020[#3020] [sirius-web] Simplify the code used to update the navigation bar menu and icon.
- https://github.com/eclipse-sirius/sirius-web/issues/3024[#3024] [diagram] Added two new variables `semanticEdgeSource` and `graphicalEdgeSource` to compute the target nodes of an edge.
- https://github.com/eclipse-sirius/sirius-web/issues/3050[#3050] [sirius-web] Contributes a first version of the new Sirius Web architecture
- https://github.com/eclipse-sirius/sirius-web/issues/1844[#1844] [emf] Unload resources by default when the EMF based editing context is disposed


== v2024.1.0
Expand Down
Expand Up @@ -12,6 +12,7 @@
*******************************************************************************/
package org.eclipse.sirius.components.emf.services.api;

import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.sirius.components.core.api.IEditingContext;

Expand All @@ -28,4 +29,9 @@ public interface IEMFEditingContext extends IEditingContext {
String RESOURCE_SCHEME = "sirius";

AdapterFactoryEditingDomain getDomain();

@Override
default void dispose() {
this.getDomain().getResourceSet().getResources().forEach(Resource::unload);
}
}

0 comments on commit 3acb3c3

Please sign in to comment.