From b281c4418195e8e9c4d6838ea67cbe9affc7b214 Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Wed, 16 Aug 2017 14:55:49 +0300 Subject: [PATCH] Support labels for property children refs #7438 Change-Id: I14e45c9301ce46c72dfbc07c9bf2527181d3ea9c --- .../src/org/simantics/selectionview/function/All.java | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.47.1