]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
JavaSE-1.8 compatibility fixes for some generics code.
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 22 Jan 2016 12:37:57 +0000 (12:37 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Fri, 22 Jan 2016 12:37:57 +0000 (12:37 +0000)
refs #6255

git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@32288 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/InputLabeler.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/ModuleLabeler.java
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/browser/contributions/VariableLabeler.java
org.simantics.sysdyn/src/org/simantics/sysdyn/utils/LoopUtils.java
org.simantics.sysdyn/src/org/simantics/sysdyn/utils/SCLUtils.java

index 7d34ce2c3f04665433ed929d2b3978c07fa7d008..7c6a800e0459f1db0484f1fbe76767f7e40f33ae 100644 (file)
@@ -12,6 +12,7 @@
 package org.simantics.sysdyn.ui.browser.contributions;\r
 \r
 import org.simantics.browsing.ui.graph.contributor.labeler.LabelerContributor;\r
+import org.simantics.databoard.Bindings;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.exception.DatabaseException;\r
@@ -28,7 +29,7 @@ public class InputLabeler extends LabelerContributor<InputNode>{
         Resource varres = var.data;\r
         StringBuilder sb = new StringBuilder();\r
         for(Resource r : graph.getObjects(varres, l0.HasName))\r
-            sb.append(graph.getValue(r));\r
+            sb.append(graph.<String>getValue(r, Bindings.STRING));\r
                if(graph.isInstanceOf(varres, L0X.Realization)) {\r
                        varres = graph.getPossibleObject(varres, L0X.Represents);\r
                        if(varres == null) return sb.toString();\r
@@ -36,7 +37,7 @@ public class InputLabeler extends LabelerContributor<InputNode>{
                sb.append(" : ");\r
                for(Resource t : graph.getObjects(varres, l0.InstanceOf))\r
                        for(Resource r : graph.getObjects(t, l0.HasName))\r
-                               sb.append(graph.getValue(r));\r
+                               sb.append(graph.<String>getValue(r, Bindings.STRING));\r
         return sb.toString();\r
     }\r
 \r
index 6c2680984e505c64d38971d18407a9ab8b700d19..e1765db247ad8e60b0d09ef3e3561f2ae5406138 100644 (file)
@@ -12,6 +12,7 @@
 package org.simantics.sysdyn.ui.browser.contributions;\r
 \r
 import org.simantics.browsing.ui.graph.contributor.labeler.LabelerContributor;\r
+import org.simantics.databoard.Bindings;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.exception.DatabaseException;\r
@@ -28,7 +29,7 @@ public class ModuleLabeler  extends LabelerContributor<ModuleNode>{
         Resource resource = module.data;\r
         StringBuilder sb = new StringBuilder();\r
         for(Resource r : graph.getObjects(resource, l0.HasName))\r
-            sb.append(graph.getValue(r));\r
+            sb.append(graph.<String>getValue(r, Bindings.STRING));\r
                if(graph.isInstanceOf(resource, L0X.Realization)) {\r
                        resource = graph.getPossibleObject(resource, L0X.Represents);\r
                        if(resource == null) return sb.toString();\r
@@ -36,7 +37,7 @@ public class ModuleLabeler  extends LabelerContributor<ModuleNode>{
                sb.append(" : ");\r
                for(Resource t : graph.getObjects(resource, l0.InstanceOf))\r
                        for(Resource r : graph.getObjects(t, l0.HasName))\r
-                               sb.append(graph.getValue(r));\r
+                               sb.append(graph.<String>getValue(r, Bindings.STRING));\r
         return sb.toString();\r
     }\r
 \r
index 6302ad0d922fc30f239f7038113119819875d563..ea153ce82736a20af9db048de4885f6e8a1b8c7b 100644 (file)
@@ -12,6 +12,7 @@
 package org.simantics.sysdyn.ui.browser.contributions;\r
 \r
 import org.simantics.browsing.ui.graph.contributor.labeler.LabelerContributor;\r
+import org.simantics.databoard.Bindings;\r
 import org.simantics.db.ReadGraph;\r
 import org.simantics.db.Resource;\r
 import org.simantics.db.exception.DatabaseException;\r
@@ -28,7 +29,7 @@ public class VariableLabeler  extends LabelerContributor<VariableNode<Resource>>
                Resource varres = var.data;\r
                StringBuilder sb = new StringBuilder();\r
                for(Resource r : graph.getObjects(varres, l0.HasName))\r
-                       sb.append(graph.getValue(r));\r
+                       sb.append(graph.<String>getValue(r, Bindings.STRING));\r
                if(graph.isInstanceOf(varres, L0X.Realization)) {\r
                        varres = graph.getPossibleObject(varres, L0X.Represents);\r
                        if(varres == null) return sb.toString();\r
@@ -36,7 +37,7 @@ public class VariableLabeler  extends LabelerContributor<VariableNode<Resource>>
                sb.append(" : ");\r
                for(Resource t : graph.getObjects(varres, l0.InstanceOf))\r
                        for(Resource r : graph.getObjects(t, l0.HasName))\r
-                               sb.append(graph.getValue(r));\r
+                               sb.append(graph.<String>getValue(r, Bindings.STRING));\r
                return sb.toString();\r
        }\r
 \r
index 4203b80a82d57c32231325554a5f75bcedf3dc96..b87ce8393ebf8468a59391b520e716f1fdfe2fd1 100644 (file)
@@ -232,7 +232,7 @@ public class LoopUtils {
                        if (j < cycle.size() - 1) {\r
                                sb.append(g.getPossibleRelatedValue(node, l0.HasName, Bindings.STRING) + " -> ");\r
                        } else {\r
-                               sb.append(g.getPossibleRelatedValue(node, l0.HasName, Bindings.STRING));\r
+                               sb.append(g.<String>getPossibleRelatedValue(node, l0.HasName, Bindings.STRING));\r
                        }\r
                }\r
                return sb.toString();\r
index 5fe85aed0ac020432b7587a04c20f99172490f8e..1affa2056f26f84778d1e86cb06c5caea053720d 100644 (file)
@@ -81,7 +81,7 @@ public class SCLUtils {
                StringBuilder name = new StringBuilder();\r
                \r
                Resource variable = graph.getSingleObject(parameter, l0.PartOf);\r
-               name.append(graph.getRelatedValue(variable, l0.HasName, Bindings.STRING));\r
+               name.append(graph.<String>getRelatedValue(variable, l0.HasName, Bindings.STRING));\r
 \r
                String suffix = graph.getPossibleRelatedValue(parameter, sys.Expression_arrayRange, Bindings.STRING);\r
                if (suffix != null) {\r