import org.simantics.layer0.Layer0;
import org.simantics.operation.Layer0X;
import org.simantics.ui.workbench.IResourceEditorInput2;
-import org.simantics.utils.datastructures.Callback;
import org.simantics.utils.ui.ErrorLogger;
/**
return createRuntimeDiagram(graph, diagram, desc);
}
- private void listenRequest(RequestProcessor processor, final Resource diagram) {
- processor.asyncRequest(new RuntimeVariableForInput(getResourceInput()), new AsyncListener<RuntimeDiagramDesc>() {
+ private void listenRequest(RequestProcessor processor, final Resource diagram) throws DatabaseException {
+ processor.syncRequest(new RuntimeVariableForInput(getResourceInput()), new AsyncListener<RuntimeDiagramDesc>() {
@Override
public void exception(AsyncReadGraph graph, Throwable throwable) {
if (runtime != null)
writeConfig(graph, runtime, diagram, desc);
}
- }, new Callback<DatabaseException>() {
- @Override
- public void run(DatabaseException e) {
- ListenerSupport s = support;
- if (e != null && s != null)
- s.exception(e);
- }
+ }, e -> {
+ ListenerSupport s = support;
+ if (e != null && s != null)
+ s.exception(e);
});
}
});
}
- private Resource createRuntimeDiagram(WriteGraph graph, Resource diagram, RuntimeDiagramDesc desc) throws DatabaseException {
+ protected Resource createRuntimeDiagram(WriteGraph graph, Resource diagram, RuntimeDiagramDesc desc) throws DatabaseException {
Layer0 L0 = Layer0.getInstance(graph);
final DiagramResource DIA = DiagramResource.getInstance(graph);