Source:
public void close(IProgressMonitor monitor) { if (!isOpen()) { return; } if (saver != null && getTransactionalEditingDomain() != null) { getTransactionalEditingDomain().removeResourceSetListener(saver); } ViewpointRegistry.getInstance().removeListener(this.vsmUpdater); this.vsmUpdater = null; notifyListeners(SessionListener.CLOSING); disableAndRemoveECrossReferenceAdapters(); if (controlledResourcesDetector != null) { controlledResourcesDetector.dispose(); controlledResourcesDetector = null; } if (dAnalysisRefresher != null) { dAnalysisRefresher.dispose(); dAnalysisRefresher = null; } removeListener(getRefreshEditorsListener()); refreshEditorsListeners = null; reloadingPolicy = null; savingPolicy = null; if (interpreter != null) { interpreter.dispose(); } ResourceSetSync.getOrInstallResourceSetSync(transactionalEditingDomain).unregisterClient(resourcesSynchronizer); ResourceSetSync.uninstallResourceSetSync(transactionalEditingDomain); super.setOpen(false); ResourceSet resourceSet = getTransactionalEditingDomain().getResourceSet(); if (currentResourceCollector != null) { currentResourceCollector.dispose(); currentResourceCollector = null; } interpreter = null; representationNameListener.dispose(); representationNameListener = null; representationsChangeAdapter = null; if (broker != null) { broker.dispose(); broker = null; } flushOperations(transactionalEditingDomain); unloadResources(); if (disposeEditingDomainOnClose) { for (Resource resource : new ArrayList<Resource>(resourceSet.getResources())) { resource.unload(); resourceSet.getResources().remove(resource); } } notifyListeners(SessionListener.CLOSED); SessionManager.INSTANCE.remove(this); tracker.dispose(); if (semanticResources != null) { semanticResources.clear(); } crossReferencer = null; saver.dispose(); if (disposeEditingDomainOnClose) { transactionalEditingDomain.dispose(); doDisposePermissionAuthority(resourceSet); transactionalEditingDomain = null; } getActivatedViewpoints().clear(); services = null; sessionResource = null; mainDAnalysis = null; }

Target:
public void close(IProgressMonitor monitor) { if (!isOpen()) { return; } if (saver != null && getTransactionalEditingDomain() != null) { getTransactionalEditingDomain().removeResourceSetListener(saver); } ViewpointRegistry.getInstance().removeListener(this.vsmUpdater); this.vsmUpdater = null; notifyListeners(SessionListener.CLOSING); disableAndRemoveECrossReferenceAdapters(); if (controlledResourcesDetector != null) { controlledResourcesDetector.dispose(); controlledResourcesDetector = null; } if (dAnalysisRefresher != null) { dAnalysisRefresher.dispose(); dAnalysisRefresher = null; } removeListener(getRefreshEditorsListener()); refreshEditorsListeners = null; reloadingPolicy = null; savingPolicy = null; if (interpreter != null) { interpreter.dispose(); } ResourceSetSync.getOrInstallResourceSetSync(transactionalEditingDomain).unregisterClient(resourcesSynchronizer); ResourceSetSync.uninstallResourceSetSync(transactionalEditingDomain); super.setOpen(false); ResourceSet resourceSet = getTransactionalEditingDomain().getResourceSet(); if (currentResourceCollector != null) { currentResourceCollector.dispose(); currentResourceCollector = null; } interpreter = null; representationNameListener.dispose(); representationNameListener = null; representationsChangeAdapter = null; if (broker != null) { broker.dispose(); broker = null; } flushOperations(transactionalEditingDomain); unloadResources(); if (disposeEditingDomainOnClose) { for (Resource resource : new ArrayList<Resource>(resourceSet.getResources())) { resource.unload(); resourceSet.getResources().remove(resource); } } notifyListeners(SessionListener.CLOSED); SessionManager.INSTANCE.remove(this); if (tracker != null) { tracker.dispose(); tracker = null; } if (semanticResources != null) { semanticResources.clear(); } crossReferencer = null; saver.dispose(); if (disposeEditingDomainOnClose) { transactionalEditingDomain.dispose(); doDisposePermissionAuthority(resourceSet); transactionalEditingDomain = null; } getActivatedViewpoints().clear(); services = null; sessionResource = null; mainDAnalysis = null; }