Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2010-03-04 19:20:27 +0000
committerKen Ryall2010-03-04 19:20:27 +0000
commitfdc4d939250950b90d0ed147ac72db640e3348b7 (patch)
tree549e23aa1346ed827599d384f41fd5b7789c69f5 /launch/org.eclipse.cdt.launch/src/org
parent15dbb8f8b5c2aff078a6c472e48dc151e4f22126 (diff)
downloadorg.eclipse.cdt-fdc4d939250950b90d0ed147ac72db640e3348b7.tar.gz
org.eclipse.cdt-fdc4d939250950b90d0ed147ac72db640e3348b7.tar.xz
org.eclipse.cdt-fdc4d939250950b90d0ed147ac72db640e3348b7.zip
Make requiring a C project optional.
Diffstat (limited to 'launch/org.eclipse.cdt.launch/src/org')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate2.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate2.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate2.java
index e62cdf3cd93..4e96654a429 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate2.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate2.java
@@ -44,9 +44,20 @@ import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
public abstract class AbstractCLaunchDelegate2 extends LaunchConfigurationDelegate {
private boolean workspaceBuildBeforeLaunch;
+ private boolean requireCProject;
private IProject project;
private String preLaunchBuildConfiguration;
+ public AbstractCLaunchDelegate2() {
+ super();
+ this.requireCProject = true;
+ }
+
+ public AbstractCLaunchDelegate2(boolean requireCProject) {
+ super();
+ this.requireCProject = requireCProject;
+ }
+
/**
* Recursively creates a set of projects referenced by the current project
*
@@ -244,12 +255,12 @@ public abstract class AbstractCLaunchDelegate2 extends LaunchConfigurationDelega
protected ICProject verifyCProject(ILaunchConfiguration config) throws CoreException {
String name = CDebugUtils.getProjectName(config);
- if (name == null) {
+ if (name == null && requireCProject) {
abort(LaunchMessages.getString("AbstractCLaunchDelegate.C_Project_not_specified"), null, //$NON-NLS-1$
ICDTLaunchConfigurationConstants.ERR_UNSPECIFIED_PROJECT);
}
ICProject cproject = CDebugUtils.getCProject(config);
- if (cproject == null) {
+ if (cproject == null && requireCProject) {
IProject proj = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
if (!proj.exists()) {
abort(

Back to the top