]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.platform.ui.ontology/graph/scl/SCLMain.scl
Better support for ontological profiles
[simantics/platform.git] / bundles / org.simantics.platform.ui.ontology / graph / scl / SCLMain.scl
index 83bb80ea893ab44f8c906e10df0d51ad0d9c6cb4..44bf61267b7b9fbe0f6fc0b2eda98534f62dcab8 100644 (file)
@@ -80,4 +80,14 @@ modifyCodeHandler self input ctx = do
   variable = currentRangeExpressionVariable self input
   setExpression variable val
   Nothing
+
+standardPropertiesElementTransformation :: Variable -> <ReadGraph> Variable
+standardPropertiesElementTransformation var = do
+  match getPossibleType var with
+    Nothing -> var
+    Just resourceType -> if isInheritedFrom resourceType DIA.Element then do
+        match possibleObject (represents var) MOD.ElementToComponent with
+          Nothing -> var
+          Just component -> resourceVariable component
+      else var
   
\ No newline at end of file