From 6cca4ecce92c0ef7cf69e6905c07363ed59c2764 Mon Sep 17 00:00:00 2001 From: lempinen Date: Mon, 2 May 2011 07:38:01 +0000 Subject: [PATCH] git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@20694 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java | 5 +++-- .../simantics/sysdyn/representation/utils/IndexUtils.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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); -- 2.47.1