X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2FuserComponent%2FComponentTypeCommands.java;fp=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2FuserComponent%2FComponentTypeCommands.java;h=de8591d5f5e037e96d97055ed01a66808bfd3b9f;hb=f40a9827f3710264f5edbda895c8eb15c07e915e;hp=9cf93fac5ce83d9067b99d7ebbb7e0da6a272f63;hpb=db618b088560ad9a524dade82a3847f8d08bfb7c;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/userComponent/ComponentTypeCommands.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/userComponent/ComponentTypeCommands.java index 9cf93fac5..de8591d5f 100644 --- a/bundles/org.simantics.modeling/src/org/simantics/modeling/userComponent/ComponentTypeCommands.java +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/userComponent/ComponentTypeCommands.java @@ -209,6 +209,7 @@ public class ComponentTypeCommands { public static void setRequiredType(WriteGraph g, Resource componentType, Resource property, String requiredType, Resource possibleType) throws DatabaseException { Layer0 L0 = Layer0.getInstance(g); + ModelingResources MOD = ModelingResources.getInstance(g); g.claimLiteral(property, L0.RequiresValueType, requiredType); if (componentType != null) { @@ -229,6 +230,9 @@ public class ComponentTypeCommands { if(g.hasStatement(possibleType, L0.Enumeration)) { // This value type is an enumeration - let's constrain the range of this predicate to match the enumeration type only g.claim(property, L0.HasRange, possibleType); + } else if (g.isInheritedFrom(possibleType, MOD.MonitorValue)) { + // Support derived properties + g.claim(property, L0.HasRange, possibleType); } }