SEL.AbstractTypedResourceTabContribution <T SEL.AbstractResourceTabContribution
>-- SEL.AbstractTypedResourceTabContribution.HasType --> L0.Type <R L0.DependsOn
+SEL.SCLTabContribution <T SEL.TabContribution
+ >-- SEL.SCLTabContribution.instantiate ==> "() -> <Proc> TabContribution" <R L0.HasProperty
+
SEL.VariableTabContribution <T SEL.TabContribution
>-- SEL.VariableTabContribution.HasTest <R L0.DependsOn
>-- SEL.VariableTabContribution.transformation ==> "Variable -> <ReadGraph> Variable" <R L0.HasProperty
public final Resource HasStandardPropertyInfo;\r
public final Resource HasStandardPropertyInfo_Inverse;\r
public final Resource IsShownUnder;\r
+ public final Resource SCLTabContribution;\r
+ public final Resource SCLTabContribution_instantiate;\r
+ public final Resource SCLTabContribution_instantiate_Inverse;\r
public final Resource SelectionTransformation;\r
public final Resource SortingName;\r
public final Resource SortingName_Inverse;\r
public static final String HasStandardPropertyInfo = "http://www.simantics.org/SelectionView-1.2/HasStandardPropertyInfo";\r
public static final String HasStandardPropertyInfo_Inverse = "http://www.simantics.org/SelectionView-1.2/HasStandardPropertyInfo/Inverse";\r
public static final String IsShownUnder = "http://www.simantics.org/SelectionView-1.2/IsShownUnder";\r
+ public static final String SCLTabContribution = "http://www.simantics.org/SelectionView-1.2/SCLTabContribution";\r
+ public static final String SCLTabContribution_instantiate = "http://www.simantics.org/SelectionView-1.2/SCLTabContribution/instantiate";\r
+ public static final String SCLTabContribution_instantiate_Inverse = "http://www.simantics.org/SelectionView-1.2/SCLTabContribution/instantiate/Inverse";\r
public static final String SelectionTransformation = "http://www.simantics.org/SelectionView-1.2/SelectionTransformation";\r
public static final String SortingName = "http://www.simantics.org/SelectionView-1.2/SortingName";\r
public static final String SortingName_Inverse = "http://www.simantics.org/SelectionView-1.2/SortingName/Inverse";\r
HasStandardPropertyInfo = getResourceOrNull(graph, URIs.HasStandardPropertyInfo);\r
HasStandardPropertyInfo_Inverse = getResourceOrNull(graph, URIs.HasStandardPropertyInfo_Inverse);\r
IsShownUnder = getResourceOrNull(graph, URIs.IsShownUnder);\r
+ SCLTabContribution = getResourceOrNull(graph, URIs.SCLTabContribution);\r
+ SCLTabContribution_instantiate = getResourceOrNull(graph, URIs.SCLTabContribution_instantiate);\r
+ SCLTabContribution_instantiate_Inverse = getResourceOrNull(graph, URIs.SCLTabContribution_instantiate_Inverse);\r
SelectionTransformation = getResourceOrNull(graph, URIs.SelectionTransformation);\r
SortingName = getResourceOrNull(graph, URIs.SortingName);\r
SortingName_Inverse = getResourceOrNull(graph, URIs.SortingName_Inverse);\r
standardSetDisplayValue2 :: Variable -> a -> <WriteGraph> ()\r
standardSetDisplayValue3 :: Variable -> a -> Binding a -> <WriteGraph> ()\r
standardGetDisplayValueDatatype :: Variable -> <ReadGraph> Datatype\r
+\r
+importJava "org.simantics.selectionview.TabContribution" where\r
+ data TabContribution\r
+
\ No newline at end of file
--- /dev/null
+package org.simantics.selectionview;\r
+\r
+import java.util.Collection;\r
+\r
+import org.simantics.db.ReadGraph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.layer0.variable.Variable;\r
+import org.simantics.db.layer0.variable.Variables;\r
+import org.simantics.scl.runtime.function.Function1;\r
+import org.simantics.scl.runtime.tuple.Tuple0;\r
+\r
+public class SCLTabContribution implements TabContribution<Object> {\r
+\r
+ final private TabContribution<Object> contribution;\r
+ \r
+ public SCLTabContribution(ReadGraph graph, Resource configuration) throws DatabaseException {\r
+ Variable var = Variables.getVariable(graph, configuration);\r
+ Function1<Object, TabContribution<Object>> function = var.getPropertyValue(graph, "instantiate");\r
+ contribution = function.apply(Tuple0.INSTANCE);\r
+ }\r
+\r
+ @Override\r
+ public boolean accept(ReadGraph graph, Object input) throws DatabaseException {\r
+ return contribution.accept(graph, input);\r
+ }\r
+\r
+ @Override\r
+ public void contribute(ReadGraph graph, Object selection, Collection<ComparableTabContributor> result)\r
+ throws DatabaseException {\r
+ contribution.contribute(graph, selection, result);\r
+ }\r
+\r
+}\r