import "Simantics/DB" import "Simantics/DB" as DB import "Simantics/Variables" import "Simantics/WorkbenchSelection" include "Simantics/SCL" include "Document/All" include "SWT/Types" importJava "org.simantics.document.swt.core.scl.SCL" where /*eventHandler :: ((String -> Maybe String) -> ()) -> EventHandler*/ decodeWSES :: Maybe String -> [WorkbenchSelectionElement] wseResource :: WorkbenchSelectionElement -> Resource contributionType :: Variable -> String contributionType var = DB.nameOf $ singleObject (resource $ uri $ variableParent var) (resource "http://www.simantics.org/SelectionView-1.2/AbstractTypedVariableTabContribution/HasType") inputVariable :: Variable -> Variable inputVariable var = propertyValue (variableParent var) "input" asComboList :: [Resource] -> [String] asComboList resources = map (\r -> DB.nameOf r) resources importJava "org.simantics.document.swt.core.scl.SCL" where propertyGetter :: Variable -> String getURI :: Variable -> String propertyDisplayValue :: Variable -> String -> String propertyValueSetter :: Variable -> String -> AbstractEventHandler