]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@20694 ac1ea38d-2e2b...
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 2 May 2011 07:38:01 +0000 (07:38 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Mon, 2 May 2011 07:38:01 +0000 (07:38 +0000)
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java
org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/IndexUtils.java

index 180b2fc594aa0f2cee34a1ec013ee821b497c531..5297a2f5a5479dc28a9f6c2cddd52034011f35a7 100644 (file)
@@ -278,8 +278,9 @@ public class ExpressionUtils {
                                                boolean isFound = false;\r
                                                Enumeration e = (Enumeration)v;\r
                                                \r
-                                               // TODO: add .elements and .size  \r
-                                               if(enumeration.equals(et.image)) {\r
+                                               if(enumeration.equals(et.image) ||\r
+                                                               "size".equals(et.image) || \r
+                                                               "elements".equals(et.image)){\r
                                                        // The full enumeration\r
                                                        isFound = true;\r
                                                } else {\r
index 6c379a42443d332b8f650265dc4b6d800594789c..a1693271c7448c8b19790fc9c6129afaa8b46ea9 100644 (file)
@@ -107,7 +107,7 @@ public class IndexUtils {
                        }\r
                        range.append("]");\r
                        \r
-                       Variable prevVar = getVariable(variable.getParentConfiguration(), prevToken);\r
+                       Variable prevVar = getVariable(variable.getParentConfiguration(), prevToken.trim());\r
                    result.append(rangeToIndexes(prevVar, range.toString()));\r
                } else {\r
                        result.append(nextToken);\r