]> gerrit.simantics Code Review - simantics/sysdyn.git/blob
a0b525426ff3335943f43acff3961c1b01d00260
[simantics/sysdyn.git] /
1 package org.simantics.sysdyn.ui.properties.widgets.expressions;\r
2 \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
9 \r
10 public class ConstantExpression extends BasicExpression {\r
11 \r
12     public ConstantExpression() {\r
13         try {\r
14             this.expressionType = SimanticsUI.getSession().syncRequest(new Read<Resource>() {\r
15 \r
16                 @Override\r
17                 public Resource perform(ReadGraph graph) throws DatabaseException {\r
18                     return SysdynResource.getInstance(graph).ConstantExpression;\r
19                 }\r
20             });\r
21         } catch (DatabaseException e) {\r
22             e.printStackTrace();\r
23         }\r
24     }\r
25 }