Source:
public void close(IProgressMonitor monitor) { if (!isOpen()) { return; } if (saver != null && getTransactionalEditingDomain() != null) { getTransactionalEditingDomain().removeResourceSetListener(saver); } if (Movida.isEnabled()) { org.eclipse.sirius.business.internal.movida.registry.ViewpointRegistry registry = (org.eclipse.sirius.business.internal.movida.registry.ViewpointRegistry) ViewpointRegistry.getInstance(); registry.removeListener((ViewpointRegistryListener) this); } else { ViewpointRegistry.getInstance().removeListener(this); } notifyListeners(SessionListener.CLOSING); disableAndRemoveECrossReferenceAdapters(); if (controlledResourcesDetector != null) { controlledResourcesDetector.dispose(); } if (dAnalysisRefresher != null) { dAnalysisRefresher.dispose(); dAnalysisRefresher = null; } if (interpreter != null) { interpreter.dispose(); } ResourceSetSync.getOrInstallResourceSetSync(transactionalEditingDomain).unregisterClient(this); ResourceSetSync.uninstallResourceSetSync(transactionalEditingDomain); super.setOpen(false); ResourceSet resourceSet = getTransactionalEditingDomain().getResourceSet(); if (currentResourceCollector != null) { currentResourceCollector.dispose(); currentResourceCollector = null; } interpreter = null; crossReferencer = null; transactionalEditingDomain.removeResourceSetListener(representationNameListener); if (broker != null) { broker.dispose(); broker = null; } flushOperations(); unloadResource(); if (disposeEditingDomainOnClose) { for (Resource resource : new ArrayList<Resource>(resourceSet.getResources())) { resource.unload(); resourceSet.getResources().remove(resource); } } notifyListeners(SessionListener.CLOSED); SessionManager.INSTANCE.remove(this); if (semanticResourcesUpdater != null) { semanticResourcesUpdater.dispose(); semanticResourcesUpdater = null; } if (semanticResources != null) { semanticResources.clear(); } saver.dispose(); if (disposeEditingDomainOnClose) { transactionalEditingDomain.dispose(); doDisposePermissionAuthority(resourceSet); } mainDAnalysis = null; }

Target:
public void close(IProgressMonitor monitor) { if (!isOpen()) { return; } if (saver != null && getTransactionalEditingDomain() != null) { getTransactionalEditingDomain().removeResourceSetListener(saver); } if (Movida.isEnabled()) { org.eclipse.sirius.business.internal.movida.registry.ViewpointRegistry registry = (org.eclipse.sirius.business.internal.movida.registry.ViewpointRegistry) ViewpointRegistry.getInstance(); registry.removeListener((ViewpointRegistryListener) this); } else { ViewpointRegistry.getInstance().removeListener(this); } notifyListeners(SessionListener.CLOSING); disableAndRemoveECrossReferenceAdapters(); if (controlledResourcesDetector != null) { controlledResourcesDetector.dispose(); } if (dAnalysisRefresher != null) { dAnalysisRefresher.dispose(); dAnalysisRefresher = null; } if (interpreter != null) { interpreter.dispose(); } ResourceSetSync.getOrInstallResourceSetSync(transactionalEditingDomain).unregisterClient(this); ResourceSetSync.uninstallResourceSetSync(transactionalEditingDomain); super.setOpen(false); ResourceSet resourceSet = getTransactionalEditingDomain().getResourceSet(); if (currentResourceCollector != null) { currentResourceCollector.dispose(); currentResourceCollector = null; } interpreter = null; crossReferencer = null; transactionalEditingDomain.removeResourceSetListener(representationNameListener); if (broker != null) { broker.dispose(); broker = null; } flushOperations(); unloadResource(); if (disposeEditingDomainOnClose) { for (Resource resource : new ArrayList<Resource>(resourceSet.getResources())) { resource.unload(); resourceSet.getResources().remove(resource); } } notifyListeners(SessionListener.CLOSED); SessionManager.INSTANCE.remove(this); if (semanticResourcesUpdater != null) { semanticResourcesUpdater.dispose(); semanticResourcesUpdater = null; } if (semanticResources != null) { semanticResources.clear(); } reenableECrossReferenceAdaptersBeforeEndOfClosing(); saver.dispose(); if (disposeEditingDomainOnClose) { transactionalEditingDomain.dispose(); doDisposePermissionAuthority(resourceSet); } mainDAnalysis = null; }