]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.selectionview/src/org/simantics/selectionview/function/All.java
Support labels for property children
[simantics/platform.git] / bundles / org.simantics.selectionview / src / org / simantics / selectionview / function / All.java
index 5137dd742ded7dfa2294364aa0e9340cea1fc904..7d9d1dba8b02bfcddc51526ff42a6f0491940949 100644 (file)
@@ -208,6 +208,9 @@ public class All {
        public static Object getPropertyChildName(ReadGraph graph, Resource resource, Object context) throws DatabaseException {
                if(context instanceof Variable) {
                        Variable variable = (Variable)context;
+                       String label = variable.getParent(graph).getPossiblePropertyValue(graph, "HasLabel", Bindings.STRING);
+                       if(label != null)
+                               return label;
                        return variable.getParent(graph).getName(graph);
                }
                throw new DatabaseException("Unknown context " + context);