From: lehtonen Date: Fri, 22 Jan 2016 12:37:57 +0000 (+0000) Subject: JavaSE-1.8 compatibility fixes for some generics code. X-Git-Tag: v1.29.0~43 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=0f002b240cd039069625d63631314cf84ceae6a5;p=simantics%2Fsysdyn.git JavaSE-1.8 compatibility fixes for some generics code. refs #6255 git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@32288 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/InputLabeler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/InputLabeler.java index 7d34ce2c..7c6a800e 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/InputLabeler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/InputLabeler.java @@ -12,6 +12,7 @@ package org.simantics.sysdyn.ui.browser.contributions; import org.simantics.browsing.ui.graph.contributor.labeler.LabelerContributor; +import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.exception.DatabaseException; @@ -28,7 +29,7 @@ public class InputLabeler extends LabelerContributor{ Resource varres = var.data; StringBuilder sb = new StringBuilder(); for(Resource r : graph.getObjects(varres, l0.HasName)) - sb.append(graph.getValue(r)); + sb.append(graph.getValue(r, Bindings.STRING)); if(graph.isInstanceOf(varres, L0X.Realization)) { varres = graph.getPossibleObject(varres, L0X.Represents); if(varres == null) return sb.toString(); @@ -36,7 +37,7 @@ public class InputLabeler extends LabelerContributor{ sb.append(" : "); for(Resource t : graph.getObjects(varres, l0.InstanceOf)) for(Resource r : graph.getObjects(t, l0.HasName)) - sb.append(graph.getValue(r)); + sb.append(graph.getValue(r, Bindings.STRING)); return sb.toString(); } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModuleLabeler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModuleLabeler.java index 6c268098..e1765db2 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModuleLabeler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModuleLabeler.java @@ -12,6 +12,7 @@ package org.simantics.sysdyn.ui.browser.contributions; import org.simantics.browsing.ui.graph.contributor.labeler.LabelerContributor; +import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.exception.DatabaseException; @@ -28,7 +29,7 @@ public class ModuleLabeler extends LabelerContributor{ Resource resource = module.data; StringBuilder sb = new StringBuilder(); for(Resource r : graph.getObjects(resource, l0.HasName)) - sb.append(graph.getValue(r)); + sb.append(graph.getValue(r, Bindings.STRING)); if(graph.isInstanceOf(resource, L0X.Realization)) { resource = graph.getPossibleObject(resource, L0X.Represents); if(resource == null) return sb.toString(); @@ -36,7 +37,7 @@ public class ModuleLabeler extends LabelerContributor{ sb.append(" : "); for(Resource t : graph.getObjects(resource, l0.InstanceOf)) for(Resource r : graph.getObjects(t, l0.HasName)) - sb.append(graph.getValue(r)); + sb.append(graph.getValue(r, Bindings.STRING)); return sb.toString(); } diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/VariableLabeler.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/VariableLabeler.java index 6302ad0d..ea153ce8 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/VariableLabeler.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/VariableLabeler.java @@ -12,6 +12,7 @@ package org.simantics.sysdyn.ui.browser.contributions; import org.simantics.browsing.ui.graph.contributor.labeler.LabelerContributor; +import org.simantics.databoard.Bindings; import org.simantics.db.ReadGraph; import org.simantics.db.Resource; import org.simantics.db.exception.DatabaseException; @@ -28,7 +29,7 @@ public class VariableLabeler extends LabelerContributor> Resource varres = var.data; StringBuilder sb = new StringBuilder(); for(Resource r : graph.getObjects(varres, l0.HasName)) - sb.append(graph.getValue(r)); + sb.append(graph.getValue(r, Bindings.STRING)); if(graph.isInstanceOf(varres, L0X.Realization)) { varres = graph.getPossibleObject(varres, L0X.Represents); if(varres == null) return sb.toString(); @@ -36,7 +37,7 @@ public class VariableLabeler extends LabelerContributor> sb.append(" : "); for(Resource t : graph.getObjects(varres, l0.InstanceOf)) for(Resource r : graph.getObjects(t, l0.HasName)) - sb.append(graph.getValue(r)); + sb.append(graph.getValue(r, Bindings.STRING)); return sb.toString(); } diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/LoopUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/LoopUtils.java index 4203b80a..b87ce839 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/LoopUtils.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/LoopUtils.java @@ -232,7 +232,7 @@ public class LoopUtils { if (j < cycle.size() - 1) { sb.append(g.getPossibleRelatedValue(node, l0.HasName, Bindings.STRING) + " -> "); } else { - sb.append(g.getPossibleRelatedValue(node, l0.HasName, Bindings.STRING)); + sb.append(g.getPossibleRelatedValue(node, l0.HasName, Bindings.STRING)); } } return sb.toString(); diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/SCLUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/SCLUtils.java index 5fe85aed..1affa205 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/SCLUtils.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/utils/SCLUtils.java @@ -81,7 +81,7 @@ public class SCLUtils { StringBuilder name = new StringBuilder(); Resource variable = graph.getSingleObject(parameter, l0.PartOf); - name.append(graph.getRelatedValue(variable, l0.HasName, Bindings.STRING)); + name.append(graph.getRelatedValue(variable, l0.HasName, Bindings.STRING)); String suffix = graph.getPossibleRelatedValue(parameter, sys.Expression_arrayRange, Bindings.STRING); if (suffix != null) {