From: lempinen Date: Mon, 2 May 2011 07:38:01 +0000 (+0000) Subject: git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@20694 ac1ea38d-2e2b... X-Git-Tag: simantics-1.4RC1~26 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=6cca4ecce92c0ef7cf69e6905c07363ed59c2764;p=simantics%2Fsysdyn.git git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@20694 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java index 180b2fc5..5297a2f5 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java @@ -278,8 +278,9 @@ public class ExpressionUtils { boolean isFound = false; Enumeration e = (Enumeration)v; - // TODO: add .elements and .size - if(enumeration.equals(et.image)) { + if(enumeration.equals(et.image) || + "size".equals(et.image) || + "elements".equals(et.image)){ // The full enumeration isFound = true; } else { diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/IndexUtils.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/IndexUtils.java index 6c379a42..a1693271 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/IndexUtils.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/representation/utils/IndexUtils.java @@ -107,7 +107,7 @@ public class IndexUtils { } range.append("]"); - Variable prevVar = getVariable(variable.getParentConfiguration(), prevToken); + Variable prevVar = getVariable(variable.getParentConfiguration(), prevToken.trim()); result.append(rangeToIndexes(prevVar, range.toString())); } else { result.append(nextToken);