[163329] Changing validation of state machine redefinition context to require a generalization between contexts instead of a redefinition.
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/StateMachineOperations.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/StateMachineOperations.java
index 090e15b..94a9f2a 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/StateMachineOperations.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/StateMachineOperations.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: StateMachineOperations.java,v 1.9 2006/01/10 13:10:22 khussey Exp $
+ * $Id: StateMachineOperations.java,v 1.9.2.1 2006/11/08 19:11:48 khussey Exp $
*/
package org.eclipse.uml2.uml.internal.operations;
@@ -285,11 +285,12 @@
*/
public static boolean isRedefinitionContextValid(StateMachine stateMachine,
StateMachine redefined) {
- BehavioredClassifier context = stateMachine.getContext();
- if (context != null && redefined != null) {
- return context.getRedefinedClassifiers().contains(
- redefined.getContext());
+ if (redefined != null) {
+ BehavioredClassifier context = stateMachine.getContext();
+
+ return context != null
+ && context.allParents().contains(redefined.getContext());
}
return false;