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.layer0.Layer0;
\r
7 import org.simantics.sysdyn.ui.browser.nodes.SimulationResultNode;
\r
9 public class SimulationResultLabeler extends LabelerContributor<SimulationResultNode>{
\r
12 public String getLabel(ReadGraph graph, SimulationResultNode result) throws DatabaseException {
\r
13 String name = graph.getPossibleRelatedValue(result.data, Layer0.getInstance(graph).HasLabel);
\r
14 return name == null ? "Experiment (no name)" : name;
\r