示例#1
0
  public synchronized ResolutionContext startResolvingChildren(BOMNode node) throws CoreException {
    Resolution nodeRes = node.getResolution();
    if (invalidateRun || nodeRes == null) return null;

    ComponentQuery cquery = node.getQuery();
    ResolutionContext originalContext = query.getResolutionContext();
    ResolutionContext context = originalContext;
    if (!(cquery == null || cquery.equals(context.getComponentQuery())))
      context = new ResolutionContext(cquery, context);

    CSpec cspec = nodeRes.getCSpec();
    Collection<Generator> generators = cspec.getGeneratorList();
    if (generators.size() > 0) {
      if (context == originalContext)
        context = new ResolutionContext(originalContext.getComponentQuery(), originalContext);
      context.setGenerators(cspec, generators);
    }

    if (context != originalContext) query = context.getNodeQuery(query.getQualifiedDependency());
    return context;
  }