]> gerrit.simantics Code Review - simantics/sysdyn.git/blob
37d85e05132893f7b5b5eae56d3d576702d66f68
[simantics/sysdyn.git] /
1 package org.simantics.sysdyn.ui.wizards.functions;\r
2 \r
3 import org.simantics.browsing.ui.graph.contributor.labeler.LabelerContributor;\r
4 import org.simantics.db.ReadGraph;\r
5 import org.simantics.db.Resource;\r
6 import org.simantics.db.common.utils.NameUtils;\r
7 import org.simantics.db.exception.DatabaseException;\r
8 import org.simantics.sysdyn.ui.browser.nodes.FunctionLibraryNode;\r
9 \r
10 public class FunctionTreeFunctionLabeler extends LabelerContributor<FunctionLibraryNode<Resource>>{\r
11 \r
12         @Override\r
13         public String getLabel(ReadGraph graph, FunctionLibraryNode<Resource> input)\r
14                         throws DatabaseException {\r
15                 String name = NameUtils.getSafeName(graph, input.data);\r
16                 return name;\r
17         }\r
18 \r
19 \r
20 }\r