From: Tuukka Lehtonen Date: Wed, 16 Aug 2017 12:11:47 +0000 (+0300) Subject: Merge "Support labels for property children" X-Git-Tag: v1.31.0~235 X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=commitdiff_plain;h=44afe3125d7ec978029d4fbde398293c9d280661;hp=9c4f7c59dc673c6af8d3ac1d92566ff132d43826 Merge "Support labels for property children" --- diff --git a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/function/All.java b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/function/All.java index 5137dd742..7d9d1dba8 100644 --- a/bundles/org.simantics.selectionview/src/org/simantics/selectionview/function/All.java +++ b/bundles/org.simantics.selectionview/src/org/simantics/selectionview/function/All.java @@ -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);