1 package org.simantics.sysdyn.ui.browser.contributions;
\r
3 import org.simantics.browsing.ui.graph.contributor.labeler.LabelerContributor;
\r
4 import org.simantics.db.ReadGraph;
\r
5 import org.simantics.db.exception.DatabaseException;
\r
6 import org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode;
\r
8 public class SimulationResultLabeler extends LabelerContributor<SimulationResultNode>{
\r
11 public String getLabel(ReadGraph graph, SimulationResultNode result) throws DatabaseException {
\r
12 String name = graph.getPossibleRelatedValue(result.resource, graph.getBuiltins().HasLabel);
\r
13 return name == null ? "Experiment (no name)" : name;
\r