PROPERTIES.SCLFunction : PROPERTIES.ParameterType
@PROPERTIES.defAttribute L0.Value
- ==> "EventHandler"
+ ==> "AbstractEventHandler"
L0.HasLabel "SCL Function"
PROPERTIES.target : PROPERTIES.ParameterType
>-- COMPONENTS.Button.text
@SWT.defAttribute L0.Value "String"
>-- COMPONENTS.Button.onPress
- @SWT.defAttribute L0.Value "EventHandler"
+ @SWT.defAttribute L0.Value "AbstractEventHandler"
@attribute COMPONENTS.Button.text
""
}
@Override
- public Collection<?> getChildren(ReadGraph graph, Object parent) throws DatabaseException {
+ public Collection<Resource> getChildren(ReadGraph graph, Object parent) throws DatabaseException {
+ Resource parentResource;
+
+ if (parent instanceof Variable) {
+ parentResource = ((Variable)parent).getRepresents(graph);
+ } else {
+ parentResource = (Resource)parent;
+ }
ModelingResources MOD = ModelingResources.getInstance(graph);
Variable ruleVariable = Variables.getVariable(graph, rule);
- Function1<Object,List<?>> getChildren = ruleVariable.getPossiblePropertyValue(graph, MOD.SCLChildRule_getChildren);
+ Function1<Resource,List<Resource>> getChildren = ruleVariable.getPossiblePropertyValue(graph, MOD.SCLChildRule_getChildren);
if(getChildren == null) return Collections.emptyList();
SCLContext sclContext = SCLContext.getCurrent();
Object oldGraph = sclContext.get("graph");
try {
sclContext.put("graph", graph);
- Object value = getChildren.apply(parent);
- return (Collection<?>)value;
+ return getChildren.apply(parentResource);
} catch (Throwable t) {
throw new DatabaseException(t);
} finally {
VP.ChildContribution.HasParentNodeType MBC.Variable
VP.ChildContribution.HasChildNodeType L0.SharedOntology
VP.ChildContribution.HasRule SharedLibraries.UsedContext.Children.Rule : MOD.SCLChildRule
- @VIEWS.scl MOD.SCLChildRule.getChildren "usedSharedOntologies2" "Resource -> <ReadGraph> [Resource]"
+ @VIEWS.scl MOD.SCLChildRule.getChildren "usedSharedOntologies" "Resource -> <ReadGraph> [Resource]"
SharedLibraries.AvailableContext : VP.BrowseContext
VP.BrowseContext.HasVisualsContribution PROJECT.Contributions.StandardNameLabelRule
VP.ChildContribution.HasParentNodeType MBC.Variable
VP.ChildContribution.HasChildNodeType L0.SharedOntology
VP.ChildContribution.HasRule SharedLibraries.AvailableContext.Children.Rule : MOD.SCLChildRule
- @VIEWS.scl MOD.SCLChildRule.getChildren "availableSharedOntologies2" "Resource -> <ReadGraph> [Resource]"
+ @VIEWS.scl MOD.SCLChildRule.getChildren "availableSharedOntologies" "Resource -> <ReadGraph> [Resource]"
VIEWS.SCLValue <T DOC.SCLValue
/* @L0.assert L0.SCLValue.environment
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