private static CustomCompositeBuilder ref;
private void init() {
// Create extension point registry
ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
// Create a monitor
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
monitor = monitorFactory.createMonitor();
// Initialize the Tuscany module activators
ModuleActivatorExtensionPoint moduleActivators = extensionPoints.getExtensionPoint(ModuleActivatorExtensionPoint.class);
for (ModuleActivator activator: moduleActivators.getModuleActivators()) {
activator.start(extensionPoints);
}
// Get XML input/output factories
modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
// Get contribution workspace and assembly model factories
workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class);
assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
nodeFactory = modelFactories.getFactory(NodeImplementationFactory.class);
//atomBindingFactory = modelFactories.getFactory(AtomBindingFactory.class);
// Create XML artifact processors
StAXArtifactProcessorExtensionPoint xmlProcessorExtensions = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
xmlProcessor = new ExtensibleStAXArtifactProcessor(xmlProcessorExtensions, inputFactory, outputFactory, monitor);
// Create contribution content processor
URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
contributionProcessor = docProcessorExtensions.getProcessor(Contribution.class);
// Get the model resolvers
modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
// Create a contribution dependency builder
contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor);
// Create a composite builder