Permalink
Browse files

regenerated with current EMFText SDK

  • Loading branch information...
1 parent 4a6c660 commit c15173db1535c80e19016ff2e95f7e76a4793cac @mirkoseifert mirkoseifert committed Mar 30, 2013
@@ -222,7 +222,10 @@ protected void doLoad(java.io.InputStream inputStream, java.util.Map<?,?> option
}
clearState();
- unload();
+ unloadAndClearContents();
+ // We must set the load options again since they are deleted by the unload()
+ // method.
+ this.loadOptions = options;
org.eclipse.emf.ecore.EObject root = null;
if (result != null) {
root = result.getRoot();
@@ -260,6 +263,20 @@ protected void doLoad(java.io.InputStream inputStream, java.util.Map<?,?> option
}
}
+ protected void unloadAndClearContents() {
+ java.util.List<org.eclipse.emf.ecore.EObject> contentsInternal = getContentsInternal();
+ // unload the root objects
+ for (org.eclipse.emf.ecore.EObject eObject : contentsInternal) {
+ if (eObject instanceof org.eclipse.emf.ecore.InternalEObject) {
+ unloaded((org.eclipse.emf.ecore.InternalEObject) eObject);
+ }
+ }
+ // unload all children using the super class method
+ unload();
+ // now we can clear the contents
+ contentsInternal.clear();
+ }
+
protected boolean processTerminationRequested() {
if (terminateReload) {
delayNotifications = false;

0 comments on commit c15173d

Please sign in to comment.