]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@19508 ac1ea38d-2e2b...
authorlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 25 Jan 2011 12:59:23 +0000 (12:59 +0000)
committerlempinen <lempinen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Tue, 25 Jan 2011 12:59:23 +0000 (12:59 +0000)
org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/utils/ExpressionUtils.java

index 097ff3cba8df4500f9f50e12ec5eb6331d3f8f2d..2caf1d20c2e134340fad0b4e67149cddd8f735c5 100644 (file)
@@ -277,12 +277,19 @@ public class ExpressionUtils {
                                        if(v != null && v instanceof Enumeration) {\r
                                                boolean isFound = false;\r
                                                Enumeration e = (Enumeration)v;\r
-                                               for(EnumerationIndex ei : e.getEnumerationIndexes()) {\r
-                                                       if(ei.getName().equals(et.image)) {\r
-                                                               isFound = true;\r
-                                                               break;\r
+                                               \r
+                                               if(enumeration.equals(et.image)) {\r
+                                                       // The full enumeration\r
+                                                       isFound = true;\r
+                                               } else {\r
+                                                       for(EnumerationIndex ei : e.getEnumerationIndexes()) {\r
+                                                               if(ei.getName().equals(et.image)) {\r
+                                                                       isFound = true;\r
+                                                                       break;\r
+                                                               }\r
                                                        }\r
                                                }\r
+                                               \r
                                                if(!isFound) {\r
                                                        StringBuilder sb = new StringBuilder();\r
                                                        sb.append("Enumeration ");\r