Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Langer2016-11-01 17:11:00 +0000
committerGerrit Code Review @ Eclipse.org2016-11-02 15:04:47 +0000
commitab7afbf0aa0583b96260c2bae8f38403ab1faca6 (patch)
treec2b1667ba1ca51d23803331fab7ef79b1910a33a /launch/org.eclipse.cdt.launch
parent7181c4b9e951d51bb4edb98d0ddfefe3ee62c6c2 (diff)
downloadorg.eclipse.cdt-ab7afbf0aa0583b96260c2bae8f38403ab1faca6.tar.gz
org.eclipse.cdt-ab7afbf0aa0583b96260c2bae8f38403ab1faca6.tar.xz
org.eclipse.cdt-ab7afbf0aa0583b96260c2bae8f38403ab1faca6.zip
Bug 506843: Reset buildFailed flag on buildForLaunch
Since delegate instances are cached and reused for subsequent launches, we have to reset the buildFailed flag on subsequent builds (i.e., calls of buildForLaunch). Otherwise, this flag will remain to be set to true after a failed/cancelled build for the entire lifetime of this delegate, even if a project has been re-launched and the build succeeded. If the flag remains to be true, the dialog keeps popping up asking the user whether to succeed with the launch with errors in the project, even if the build succeeded and there are no errors any more. Change-Id: I51aece90154f817542ed7548ec4c36591b19eaec Signed-off-by: Philip Langer <planger@eclipsesource.com>
Diffstat (limited to 'launch/org.eclipse.cdt.launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java4
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate2.java3
2 files changed, 6 insertions, 1 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
index 23e1b552431..c9fe5ec1f5d 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2014 QNX Software Systems and others.
+ * Copyright (c) 2005, 2016 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,6 +12,7 @@
* Anton Leherbauer (Wind River Systems) - bug 224187
* Alex Collins (Broadcom Corp.) - choose build config automatically
* James Blackburn (Broadcom Corp.)
+ * Philip Langer (EclipseSource Services GmbH) - bug 506843
*******************************************************************************/
package org.eclipse.cdt.launch;
@@ -548,6 +549,7 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
@Override
public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
+ buildFailed = false;
workspaceBuildBeforeLaunch = true;
// check the build before launch setting and honor it
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 a2fbd4e59b0..c9a6ac24590 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
@@ -9,6 +9,7 @@
* Ken Ryall (Nokia)
* James Blackburn (Broadcom Corp.)
* Marc Khouzam (Ericsson) - Modernize Run launch (bug 464636)
+ * Philip Langer (EclipseSource Services GmbH) - bug 506843
*******************************************************************************/
package org.eclipse.cdt.launch;
@@ -321,6 +322,8 @@ public abstract class AbstractCLaunchDelegate2 extends LaunchConfigurationDelega
*/
protected void buildProject(final IProject project, final String buildConfigID, IProgressMonitor monitor) throws CoreException {
final int TOTAL_TICKS = 1000;
+
+ buildFailed = false;
// Some day, this will hopefully be a simple pass-thru to a cdt.core
// utility. See bug 313927

Back to the top