}
public boolean XXXresolve(BndEditModel inputModel, Registry pluginRegistry, Resolver resolver, LogService log) {
try {
// Resolve required resources
BndrunResolveContext resolveContext = new BndrunResolveContext(inputModel, pluginRegistry, log);
Map<Resource,List<Wire>> wirings = resolver.resolve(resolveContext);
required = invertWirings(wirings);
removeFrameworkAndInputResources(required, resolveContext);
// Resolve optional resources
resolveContext = new BndrunResolveContext(inputModel, pluginRegistry, log);
resolveContext.setOptionalRoots(wirings.keySet());
Map<Resource,List<Wire>> optionalWirings = resolver.resolve(resolveContext);
optional = invertWirings(optionalWirings);
removeFrameworkAndInputResources(optional, resolveContext);
// Remove required resources from optional resource map