use of org.eclipse.debug.core.ILaunchConfigurationType in project mdw-designer by CenturyLinkCloud.
the class AutomatedTestLaunchShortcut method findExistingLaunchConfiguration.
private ILaunchConfiguration findExistingLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy) throws CoreException {
String wcWorkflowProject = workingCopy.getAttribute(AutomatedTestLaunchConfiguration.WORKFLOW_PROJECT, "");
String wcWorkflowPackage = workingCopy.getAttribute(AutomatedTestLaunchConfiguration.WORKFLOW_PACKAGE, "");
boolean wcIsLegacyLaunch = workingCopy.getAttribute(AutomatedTestLaunchConfiguration.IS_LEGACY_LAUNCH, false);
ILaunchConfigurationType configType = workingCopy.getType();
ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations(configType);
for (ILaunchConfiguration launchConfig : configs) {
String workflowProject = launchConfig.getAttribute(AutomatedTestLaunchConfiguration.WORKFLOW_PROJECT, "");
String workflowPackage = launchConfig.getAttribute(AutomatedTestLaunchConfiguration.WORKFLOW_PACKAGE, "");
boolean isLegacyLaunch = launchConfig.getAttribute(AutomatedTestLaunchConfiguration.IS_LEGACY_LAUNCH, false);
if (wcIsLegacyLaunch != isLegacyLaunch || !wcWorkflowPackage.equals(workflowPackage) || !wcWorkflowProject.equals(workflowProject))
continue;
return launchConfig;
}
return null;
}
use of org.eclipse.debug.core.ILaunchConfigurationType in project mdw-designer by CenturyLinkCloud.
the class CucumberLaunchShortcut method createLaunchConfiguration.
protected ILaunchConfigurationWorkingCopy createLaunchConfiguration(IProject project, IFolder folder, String launchName, List<String> testCases) throws CoreException {
ILaunchConfigurationType configType = getLaunchManager().getLaunchConfigurationType(TYPE_ID);
ILaunchConfigurationWorkingCopy wc = configType.newInstance(project, getLaunchManager().generateLaunchConfigurationName(launchName));
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName());
if (folder != null)
wc.setAttribute(CucumberLaunchConfiguration.FOLDER, folder.getProjectRelativePath().toString());
wc.setAttribute(CucumberLaunchConfiguration.FEATURES, testCases);
wc.setAttribute(CucumberLaunchConfiguration.GLUE, CucumberLaunchConfiguration.DEFAULT_GLUE);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, CucumberLaunchConfiguration.DEFAULT_ARGS);
return wc;
}
use of org.eclipse.debug.core.ILaunchConfigurationType in project mdw-designer by CenturyLinkCloud.
the class ProcessLaunchShortcut method createLaunchConfiguration.
protected ILaunchConfigurationWorkingCopy createLaunchConfiguration(String typeId, WorkflowProcess processVersion, boolean debug) throws CoreException {
WorkflowProject workflowProject = processVersion.getProject();
ILaunchConfigurationType configType = getLaunchManager().getLaunchConfigurationType(typeId);
String launchConfigName = getUniqueLaunchConfigName(processVersion);
ILaunchConfigurationWorkingCopy wc = configType.newInstance(workflowProject.getSourceProject(), launchConfigName);
wc.setAttribute(ProcessLaunchConfiguration.WORKFLOW_PROJECT, workflowProject.getName());
wc.setAttribute(ProcessLaunchConfiguration.PROCESS_NAME, processVersion.getName());
wc.setAttribute(ProcessLaunchConfiguration.PROCESS_VERSION, processVersion.getVersionString());
if (debug) {
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, workflowProject.getSourceProject().getName());
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_CONNECTOR, "org.eclipse.jdt.launching.socketAttachConnector");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, getDefaultConnectArgs(workflowProject));
}
wc.setContainer(null);
return wc;
}
use of org.eclipse.debug.core.ILaunchConfigurationType in project mdw-designer by CenturyLinkCloud.
the class ProcessLaunchShortcut method getUniqueLaunchConfigName.
protected String getUniqueLaunchConfigName(WorkflowProcess processVersion) throws CoreException {
String name = processVersion.getName();
ILaunchConfigurationType configType = getLaunchManager().getLaunchConfigurationType(PROCESS_LAUNCH_CONFIG_TYPE);
ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations(configType);
for (ILaunchConfiguration launchConfig : configs) {
if (launchConfig.getName().equals(name)) {
name = processVersion.getName() + " (" + processVersion.getProject().getName() + ")";
break;
}
}
return getLaunchManager().generateLaunchConfigurationName(name);
}
use of org.eclipse.debug.core.ILaunchConfigurationType in project mdw-designer by CenturyLinkCloud.
the class ExternalEventLaunchShortcut method findExistingLaunchConfiguration.
private ILaunchConfiguration findExistingLaunchConfiguration(ILaunchConfigurationWorkingCopy workingCopy) throws CoreException {
String wcWorkflowProject = workingCopy.getAttribute(ExternalEventLaunchConfiguration.WORKFLOW_PROJECT, "");
String wcMessagePattern = workingCopy.getAttribute(ExternalEventLaunchConfiguration.EVENT_NAME, "");
ILaunchConfigurationType configType = workingCopy.getType();
ILaunchConfiguration[] configs = getLaunchManager().getLaunchConfigurations(configType);
for (ILaunchConfiguration launchConfig : configs) {
String workflowProject = launchConfig.getAttribute(ExternalEventLaunchConfiguration.WORKFLOW_PROJECT, "");
String messagePattern = launchConfig.getAttribute(ExternalEventLaunchConfiguration.EVENT_NAME, "");
if (!wcWorkflowProject.equals(workflowProject) || !wcMessagePattern.equals(messagePattern))
continue;
return launchConfig;
}
return null;
}
Aggregations