1 package org.simantics.sysdyn.ui.properties.widgets.expressions;
\r
3 import org.simantics.db.ReadGraph;
\r
4 import org.simantics.db.Resource;
\r
5 import org.simantics.db.exception.DatabaseException;
\r
6 import org.simantics.db.request.Read;
\r
7 import org.simantics.sysdyn.SysdynResource;
\r
8 import org.simantics.ui.SimanticsUI;
\r
10 public class ConstantExpression extends BasicExpression {
\r
12 public ConstantExpression() {
\r
14 this.expressionType = SimanticsUI.getSession().syncRequest(new Read<Resource>() {
\r
17 public Resource perform(ReadGraph graph) throws DatabaseException {
\r
18 return SysdynResource.getInstance(graph).ConstantExpression;
\r
21 } catch (DatabaseException e) {
\r
22 e.printStackTrace();
\r