Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkhussey2006-05-30 14:02:34 +0000
committerkhussey2006-05-30 14:02:34 +0000
commite14644e39b277ec37b1e90ed049d8415a90240da (patch)
tree19a92bdfac940b0a42cfb8c019f7d92852e07676
parentcdd6e4c755fc5d4d09d3a9a076d0254662e1f27b (diff)
downloadorg.eclipse.uml2.test-e14644e39b277ec37b1e90ed049d8415a90240da.tar.gz
org.eclipse.uml2.test-e14644e39b277ec37b1e90ed049d8415a90240da.tar.xz
org.eclipse.uml2.test-e14644e39b277ec37b1e90ed049d8415a90240da.zip
[144438] Adding migrated guards to owned rules.
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/UML22UMLResourceHandler.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/UML22UMLResourceHandler.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/UML22UMLResourceHandler.java
index 0cab0233..4a4a490d 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/UML22UMLResourceHandler.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/resource/UML22UMLResourceHandler.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: UML22UMLResourceHandler.java,v 1.24 2006/05/18 16:55:40 khussey Exp $
+ * $Id: UML22UMLResourceHandler.java,v 1.25 2006/05/30 14:02:34 khussey Exp $
*/
package org.eclipse.uml2.uml.resource;
@@ -56,6 +56,7 @@ import org.eclipse.uml2.uml.ChangeEvent;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Comment;
import org.eclipse.uml2.uml.ConnectableElement;
+import org.eclipse.uml2.uml.Constraint;
import org.eclipse.uml2.uml.DestructionEvent;
import org.eclipse.uml2.uml.Duration;
import org.eclipse.uml2.uml.DurationObservation;
@@ -104,6 +105,7 @@ import org.eclipse.uml2.uml.TemplateSignature;
import org.eclipse.uml2.uml.TimeEvent;
import org.eclipse.uml2.uml.TimeExpression;
import org.eclipse.uml2.uml.TimeObservation;
+import org.eclipse.uml2.uml.Transition;
import org.eclipse.uml2.uml.Trigger;
import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.UMLPackage;
@@ -1584,6 +1586,20 @@ public class UML22UMLResourceHandler
return super.caseTimeExpression(timeExpression);
}
+ public Object caseTransition(Transition transition) {
+ Constraint guard = transition.getGuard();
+
+ if (guard != null) {
+ EList ownedRules = transition.getOwnedRules();
+
+ if (!ownedRules.contains(guard)) {
+ ownedRules.add(guard);
+ }
+ }
+
+ return super.caseTransition(transition);
+ }
+
public Object caseTrigger(Trigger trigger) {
Event event = null;
AnyType extension = getExtension(resource, trigger);

Back to the top