Sync git svn branch with SVN repository r33406.
[simantics/platform.git] / bundles / org.simantics.charts / src / org / simantics / charts / ui / AddVariableToChartAction.java
index 994624a8b1169d82adc3b0589f2968539a578905..4caa80a66037275d2cb8a364075c185496b41901 100644 (file)
@@ -65,7 +65,7 @@ public class AddVariableToChartAction implements Runnable {
         * \r
         * @throws DatabaseException\r
         */\r
-       public void init() throws DatabaseException \r
+       public AddVariableToChartAction init() throws DatabaseException \r
        {\r
        Simantics.getSession().sync( new ReadRequest() {\r
                        @Override\r
@@ -73,6 +73,7 @@ public class AddVariableToChartAction implements Runnable {
                                init(g);\r
                        }\r
                } );\r
+       return this;\r
        }\r
 \r
        /**\r
@@ -80,7 +81,7 @@ public class AddVariableToChartAction implements Runnable {
         * \r
         * @throws DatabaseException\r
         */\r
-       public void init( ReadGraph g ) throws DatabaseException \r
+       public AddVariableToChartAction init( ReadGraph g ) throws DatabaseException \r
        {\r
        Layer0 L0 = Layer0.getInstance(g);\r
        if(chart != null) {\r
@@ -103,6 +104,8 @@ public class AddVariableToChartAction implements Runnable {
                                variableReferences.add( var.getVariableId().toPossibleString(g, configuration) );\r
                        }\r
                }\r
+\r
+               return this;\r
        }\r
        \r
        /**\r