mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Make requiring a C project optional.
This commit is contained in:
parent
15dbb8f8b5
commit
fdc4d93925
1 changed files with 13 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Reference in a new issue