Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2013-10-17 14:52:21 +0000
committerAnsgar Radermacher2013-10-17 14:55:31 +0000
commit1bebd2141fd18e669269786e99add67123ad60b8 (patch)
treef9396de2743ed785bf46caf183b9f46f044b4d7d /extraplugins
parent5659aea4f6c3e2bc4d5af5c9c62558975675ede2 (diff)
downloadorg.eclipse.papyrus-1bebd2141fd18e669269786e99add67123ad60b8.tar.gz
org.eclipse.papyrus-1bebd2141fd18e669269786e99add67123ad60b8.tar.xz
org.eclipse.papyrus-1bebd2141fd18e669269786e99add67123ad60b8.zip
- Fixed bug 419703 - [CDT integration] Stereotypes are not properly unapplied when model elements are updated
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncCDTtoModel.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncCDTtoModel.java b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncCDTtoModel.java
index 5105ea93931..f6be1450f94 100644
--- a/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncCDTtoModel.java
+++ b/extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt/src/org/eclipse/papyrus/texteditor/cdt/sync/SyncCDTtoModel.java
@@ -53,6 +53,7 @@ import org.eclipse.papyrus.texteditor.cdt.CommandSupport;
import org.eclipse.papyrus.texteditor.cdt.Utils;
import org.eclipse.papyrus.texteditor.cdt.listener.ModelListener;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
+import org.eclipse.papyrus.uml.tools.utils.UMLUtil;
import org.eclipse.ui.IEditorInput;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
@@ -278,8 +279,11 @@ public class SyncCDTtoModel implements Runnable {
}
}
+ // a parameters.clear() is not sufficient. Otherwise stereotype applications to unresolved elements remain in the model
+ UMLUtil.destroyElements(operation.getOwnedParameters());
+ UMLUtil.destroyElements(ob.getOwnedParameters());
+
operation.getOwnedParameters().clear();
- ob.getOwnedParameters().clear();
for(IASTNode declaratorChild : declarator.getChildren()) {
if(declaratorChild instanceof IASTParameterDeclaration) {
IASTParameterDeclaration parameter = (IASTParameterDeclaration)declaratorChild;
@@ -476,7 +480,6 @@ public class SyncCDTtoModel implements Runnable {
}
}
-
protected IEditorInput m_input;
protected Classifier m_classifier;

Back to the top