Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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 258d2875f9c..5139092ab1d 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.infra.core.Activator;
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.UMLUtil;
import org.eclipse.ui.IEditorInput;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
@@ -278,8 +279,10 @@ public class SyncCDTtoModel implements Runnable {
}
}
- operation.getOwnedParameters().clear();
- ob.getOwnedParameters().clear();
+ // a parameters.clear() is not sufficient. Otherwise stereotype applications to unresolved elements remain in the model
+ UMLUtil.destroyElements(operation.getOwnedParameters());
+ UMLUtil.destroyElements(ob.getOwnedParameters());
+
for(IASTNode declaratorChild : declarator.getChildren()) {
if(declaratorChild instanceof IASTParameterDeclaration) {
IASTParameterDeclaration parameter = (IASTParameterDeclaration)declaratorChild;

Back to the top