Просмотр исходного кода

Merge pull request #646 from Yakindu/issue_645

fixed issue #645 : fixed editing support for type alias wrapped enums
Axel Terfloth 9 лет назад
Родитель
Сommit
8d0df0a2be

+ 3 - 2
plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/view/editing/EnumerationEditingSupport.java

@@ -50,7 +50,7 @@ public class EnumerationEditingSupport extends ScopeSlotEditingSupport {
 	}
 
 	public EnumerationType getEnumerationType(ExecutionSlot element) {
-		EnumerationType e = (EnumerationType) element.getType();
+		EnumerationType e = (EnumerationType) element.getType().getOriginType();
 		return e;
 	}
 
@@ -73,7 +73,7 @@ public class EnumerationEditingSupport extends ScopeSlotEditingSupport {
 		if (element instanceof ExecutionSlot) {
 			if (!((ExecutionSlot) element).isWritable())
 				return false;
-			Type type = ((ExecutionSlot) element).getType();
+			Type type = ((ExecutionSlot) element).getType().getOriginType();
 			return type instanceof EnumerationType;
 		}
 		return false;
@@ -93,4 +93,5 @@ public class EnumerationEditingSupport extends ScopeSlotEditingSupport {
 		}
 		return null;
 	}
+	
 }