}
@Override
public void execute(ReadGraph graph, final Resource run) throws DatabaseException {
- if(run != null) {
- SimulationResource SIMU = SimulationResource.getInstance(graph);
- Variable var = Variables.getVariable(graph, run);
- IExperiment exp = var.getPossiblePropertyValue(graph, SIMU.Run_iExperiment);
- ITrendSupport ts = exp.getService(ITrendSupport.class);
- if (ts != null)
- ts.setChartData(graph);
- }
+ if(run != null) {
+ SimulationResource SIMU = SimulationResource.getInstance(graph);
+ Variable var = Variables.getPossibleVariable(graph, run);
+ IExperiment exp = var != null ? var.getPossiblePropertyValue(graph, SIMU.Run_iExperiment) : null;
+ ITrendSupport ts = exp != null ? exp.getService(ITrendSupport.class) : null;
+ if (ts != null)
+ ts.setChartData(graph);
+ }
}
@Override
public boolean isDisposed() {