1 package org.simantics.structural2.variables;
3 import org.simantics.databoard.binding.Binding;
4 import org.simantics.db.ReadGraph;
5 import org.simantics.db.Resource;
6 import org.simantics.db.exception.DatabaseException;
7 import org.simantics.db.layer0.variable.StandardExpressionGraphPropertyVariable;
8 import org.simantics.db.layer0.variable.Variable;
9 import org.simantics.structural2.scl.CompileProceduralExpressionValueRequest;
11 public class StructuralProceduralExpressionPropertyVariable extends StandardExpressionGraphPropertyVariable {
13 public StructuralProceduralExpressionPropertyVariable(ReadGraph graph,
14 Variable parent, Resource property, String expressionText)
15 throws DatabaseException {
16 super(graph, parent, property, expressionText);
20 protected Object compute(ReadGraph graph, Variable context) throws DatabaseException {
21 return CompileProceduralExpressionValueRequest.compileAndEvaluate(graph, expressionText, context);
25 protected Object compute(ReadGraph graph, Variable context, Binding binding) throws DatabaseException {
26 return CompileProceduralExpressionValueRequest.compileAndEvaluate(graph, expressionText, context);