// Configure the node
String nodeName = configureNode(contributionURI, contributionLocation, compositeURI, progressMonitor);
// Get the node launch configuration
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchConfigurationType =launchManager.getLaunchConfigurationType(TUSCANY_LAUNCH_CONFIGURATIONTYPE);
ILaunchConfiguration configuration = null;
for (ILaunchConfiguration c : launchManager.getLaunchConfigurations(launchConfigurationType)) {
if (file.getFullPath().toString().equals(c.getAttribute("COMPOSITE_PATH", ""))) {
configuration = c;
break;
}
}
if (configuration == null) {
progressMonitor.worked(10);
if (progressMonitor.isCanceled()) {
return;
}
// Create a new launch configuration
ILaunchConfigurationWorkingCopy newConfiguration = launchConfigurationType.newInstance(null,
launchManager.generateUniqueLaunchConfigurationNameFrom(file.getName()));
// Set the project and type to launch
newConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, file.getProject().getName());
newConfiguration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "org.apache.tuscany.sca.node.launcher.NodeLauncher");