X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.platform.ui.ontology%2Fgraph%2Fscl%2FSCLMain.scl;h=44bf61267b7b9fbe0f6fc0b2eda98534f62dcab8;hb=11532e91770beadd55d85037c4b5e00bbcace69f;hp=83bb80ea893ab44f8c906e10df0d51ad0d9c6cb4;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.platform.ui.ontology/graph/scl/SCLMain.scl b/bundles/org.simantics.platform.ui.ontology/graph/scl/SCLMain.scl index 83bb80ea8..44bf61267 100644 --- a/bundles/org.simantics.platform.ui.ontology/graph/scl/SCLMain.scl +++ b/bundles/org.simantics.platform.ui.ontology/graph/scl/SCLMain.scl @@ -80,4 +80,14 @@ modifyCodeHandler self input ctx = do variable = currentRangeExpressionVariable self input setExpression variable val Nothing + +standardPropertiesElementTransformation :: Variable -> 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