import org.simantics.graph.representation.Identity;
import org.simantics.graph.representation.IdentityDefinition;
import org.simantics.graph.representation.Internal;
+import org.simantics.graph.representation.Optional;
import org.simantics.graph.representation.Root;
import org.simantics.graph.representation.TransferableGraph1;
import org.simantics.graph.representation.Value;
else if(definition instanceof Root) {
resources[identity.resource] = RootLibrary;
}
+ else if(definition instanceof Optional) {
+ Optional def = (Optional)definition;
+ Resource parent = resources[def.parent];
+ if(parent == null)
+ continue;
+ Resource child = graph.syncRequest(
+ new UnescapedChildMapOfResource(parent),
+ new TransientCacheAsyncListener<Map<String, Resource>>())
+ .get(def.name);
+ resources[identity.resource] = child; // might be null
+ }
}
}