]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Moved label generation to separate init() method
authorMarko Luukkainen <marko.luukkainen@vtt.fi>
Tue, 6 Mar 2018 12:46:29 +0000 (14:46 +0200)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Tue, 6 Mar 2018 12:46:29 +0000 (14:46 +0200)
Change-Id: I19de25135578ffa826c46c940191b6e0337bc3c6

org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateNode.java

index cc996a28239159d5ef94d666f49f2a9c1bae6f1f..486b3a1ec204b882db7dbd0e86c4d4addeb9b66c 100644 (file)
@@ -30,7 +30,7 @@ public class UpdateNode {
                this.status = status;
                this.op = op;
                this.r = op.getResource();
-               this.label = getLabel(g, r);
+               init(g);
        }
        
        public UpdateNode(ReadGraph g, UpdateStatus status, Resource r) throws DatabaseException {
@@ -38,6 +38,10 @@ public class UpdateNode {
                this.status = status;
                this.op = null;
                this.r = r;
+               init(g);
+       }
+       
+       protected void init(ReadGraph g) throws DatabaseException {
                this.label = getLabel(g, r);
        }