]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.platform.ui.ontology/graph/scl/SCLMain.scl
Fixed some issues in objmap2
[simantics/platform.git] / bundles / org.simantics.platform.ui.ontology / graph / scl / SCLMain.scl
index 83bb80ea893ab44f8c906e10df0d51ad0d9c6cb4..44c53d80e4cfa35e9320f51ae3b93227eac94dbe 100644 (file)
@@ -1,12 +1,6 @@
 include "Simantics/All"
 include "SWT/All"
 
-usedSharedOntologies2 :: Variable -> <ReadGraph> [Resource]
-usedSharedOntologies2 model = usedSharedOntologies $ represents model
-
-availableSharedOntologies2 :: Variable -> <ReadGraph> [Resource]
-availableSharedOntologies2 model = availableSharedOntologies $ represents model
-
 useSelectedHandler :: Variable -> (String -> Maybe String) -> <WriteGraph> String
 useSelectedHandler input parameters = do
   model = represents input
@@ -80,4 +74,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