/** * Adds an included composite. * * @param include the composite to include */ public void add(Include include) { include.setParent(this); includes.put(include.getName(), include); componentsView.putAll(include.getIncluded().getComponents()); wiresView.addAll(include.getIncluded().getWires()); channelsView.putAll(include.getIncluded().getChannels()); resourcesView.addAll(include.getIncluded().getResources()); }
public void instantiateCompositeWires(Composite composite, LogicalCompositeComponent parent, InstantiationContext context) { // instantiate wires held directly in the composite and in included composites for (Wire definition : composite.getWires()) { // resolve the source reference Target referenceTarget = definition.getReferenceTarget(); LogicalReference reference = resolveReference(referenceTarget, parent, context); if (reference == null) { // error resolving, continue processing other targets so all errors are collated continue; } // resolve the target service Target serviceTarget = definition.getServiceTarget(); LogicalService service = resolveService(reference, serviceTarget, parent, context); if (service == null) { // error resolving, continue processing other targets so all errors are collated continue; } // create the wire URI contributionUri = parent.getDefinition().getContributionUri(); LogicalWire wire = new LogicalWire(parent, reference, service, contributionUri); String referenceBindingName = referenceTarget.getBinding(); String serviceBindingName = serviceTarget.getBinding(); resolveBindings(reference, referenceBindingName, service, wire, serviceBindingName, context); parent.addWire(reference, wire); } }
public void instantiateCompositeWires(Composite composite, LogicalCompositeComponent parent, InstantiationContext context) { // instantiate wires held directly in the composite and in included composites for (Wire definition : composite.getWires()) { // resolve the source reference Target referenceTarget = definition.getReferenceTarget(); LogicalReference reference = resolveReference(referenceTarget, parent, context); if (reference == null) { // error resolving, continue processing other targets so all errors are collated continue; } // resolve the target service Target serviceTarget = definition.getServiceTarget(); LogicalService service = resolveService(reference, serviceTarget, parent, context); if (service == null) { // error resolving, continue processing other targets so all errors are collated continue; } // create the wire URI contributionUri = parent.getDefinition().getContributionUri(); LogicalWire wire = new LogicalWire(parent, reference, service, contributionUri); String referenceBindingName = referenceTarget.getBinding(); String serviceBindingName = serviceTarget.getBinding(); resolveBindings(reference, referenceBindingName, service, wire, serviceBindingName, context); parent.addWire(reference, wire); } }