From: Marko Luukkainen Date: Tue, 6 Mar 2018 12:46:29 +0000 (+0200) Subject: Moved label generation to separate init() method X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=15c1156405f16fe034e7b7703e01f06ac6541b40;p=simantics%2Finterop.git Moved label generation to separate init() method Change-Id: I19de25135578ffa826c46c940191b6e0337bc3c6 --- diff --git a/org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateNode.java b/org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateNode.java index cc996a2..486b3a1 100644 --- a/org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateNode.java +++ b/org.simantics.interop.update/src/org/simantics/interop/update/model/UpdateNode.java @@ -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); }