Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcdumoulin2012-02-21 12:48:20 +0000
committercdumoulin2012-02-21 12:48:20 +0000
commit749dc1c226a87ba3d7be2dd31b2d8496a699ca87 (patch)
treeaf89c7b763855216fd03b1a25e5a8b130cd8df7b /incoming
parent20e2be425671a2e3c0fbc7012631cf5bd0119d29 (diff)
downloadorg.eclipse.papyrus-749dc1c226a87ba3d7be2dd31b2d8496a699ca87.tar.gz
org.eclipse.papyrus-749dc1c226a87ba3d7be2dd31b2d8496a699ca87.tar.xz
org.eclipse.papyrus-749dc1c226a87ba3d7be2dd31b2d8496a699ca87.zip
NEW - bug 372046: [ModelSet] ModelSet should allow to have unexisting associated model.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372046 Allow example to have a own resource
Diffstat (limited to 'incoming')
-rw-r--r--incoming/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/modelresource/TextEditorModelCommentResource.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/incoming/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/modelresource/TextEditorModelCommentResource.java b/incoming/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/modelresource/TextEditorModelCommentResource.java
index d4713326d58..74d4be96bed 100644
--- a/incoming/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/modelresource/TextEditorModelCommentResource.java
+++ b/incoming/org.eclipse.papyrus.example.uml.comment.editor.newresource/src/org/eclipse/papyrus/example/uml/comment/editor/newresource/modelresource/TextEditorModelCommentResource.java
@@ -14,10 +14,11 @@
package org.eclipse.papyrus.example.uml.comment.editor.newresource.modelresource;
import org.eclipse.papyrus.example.text.instance.papyrustextinstance.PapyrusTextInstance;
import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
+import org.eclipse.papyrus.infra.core.resource.AbstractDynamicModel;
import org.eclipse.papyrus.infra.core.resource.IModel;
-public class TextEditorModelCommentResource extends AbstractBaseModel implements IModel {
+public class TextEditorModelCommentResource extends AbstractDynamicModel<PapyrusTextInstance> implements IModel {
/*
* To save in a new file :
@@ -80,7 +81,8 @@ public class TextEditorModelCommentResource extends AbstractBaseModel implements
* The compareInstance to add.
*/
public void addPapyrusTextInstance(PapyrusTextInstance compareInstance) {
- getResource().getContents().add(compareInstance);
+// getResource().getContents().add(compareInstance);
+ addModelRoot(compareInstance);
}
/**

Back to the top