+ LOGGER.error("WorkbenchSelectionElement.getContent failed for type AnyVariable", e);
+ }
+ }
+ else if(contentType instanceof ParentVariable) {
+ ParentVariable type = (ParentVariable)contentType;
+ try {
+ return (T) type.processor.sync(new ResourceRead2<Variable>(runtime, element) {
+ @Override
+ public Variable perform(ReadGraph graph) throws DatabaseException {
+ DiagramResource DIA = DiagramResource.getInstance(graph);
+
+ String uri = graph.getPossibleRelatedValue(resource, DIA.RuntimeDiagram_HasVariable);
+ if (uri == null)
+ return null;
+
+ Variable var = Variables.getPossibleVariable(graph, uri);
+ if (var == null)
+ return null;
+
+ return var;
+ }
+ });
+ } catch (DatabaseException e) {
+ LOGGER.error("WorkbenchSelectionElement.getContent failed for type ParentVariable", e);