From 3513e5a63418f3745675e1016da96af67d517276 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Mon, 30 Jan 2006 21:30:54 +0000 Subject: [PATCH] Bug 123997: launching subclasses of AbstractCLaunchDelegate causes progress information to be lost. Applied patch from Andrew Ferguson (andrew.ferguson@arm.com). --- launch/org.eclipse.cdt.launch/ChangeLog | 5 ++ .../cdt/launch/AbstractCLaunchDelegate.java | 64 +++++++++---------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog index fa1075bb01f..e0542472738 100644 --- a/launch/org.eclipse.cdt.launch/ChangeLog +++ b/launch/org.eclipse.cdt.launch/ChangeLog @@ -1,3 +1,8 @@ +2006-01-30 Mikhail Khodjaiants + Bug 123997: launching subclasses of AbstractCLaunchDelegate causes progress information to be lost. + Applied patch from Andrew Ferguson (andrew.ferguson@arm.com). + * AbstractCLaunchDelegate.java + 2006-01-29 Mikhail Khodjaiants Bug 118894: Allow stopping at other locations other than main(). Applied patch from Ken Ryall (Nokia). 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 2b09295203b..2704cc662c8 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 @@ -7,6 +7,7 @@ * * Contributors: * QNX Software Systems - initial API and implementation + * Andrew Ferguson (andrew.ferguson@arm.com) - bug 123997 *******************************************************************************/ package org.eclipse.cdt.launch; @@ -640,44 +641,39 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat * if an exception occurs while checking for compile errors. */ public boolean finalLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException { - try { - boolean continueLaunch = true; - if (orderedProjects != null) { - monitor.beginTask(LaunchMessages.getString("AbstractCLaunchDelegate.searching_for_errors"), //$NON-NLS-1$ - orderedProjects.size() + 1); - - boolean compileErrorsInProjs = false; - - //check prerequisite projects for compile errors. - for (Iterator i = orderedProjects.iterator(); i.hasNext();) { - IProject proj = (IProject)i.next(); - monitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.searching_for_errors_in") //$NON-NLS-1$ - + proj.getName()); - compileErrorsInProjs = existsErrors(proj); - if (compileErrorsInProjs) { - break; - } - } - - //check current project, if prerequite projects were ok - if (!compileErrorsInProjs) { - monitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.searching_for_errors_in") //$NON-NLS-1$ - + project.getName()); - compileErrorsInProjs = existsErrors(project); - } - - //if compile errors exist, ask the user before continuing. + boolean continueLaunch = true; + if (orderedProjects != null) { + monitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.searching_for_errors")); //$NON-NLS-1$ + + boolean compileErrorsInProjs = false; + + //check prerequisite projects for compile errors. + for (Iterator i = orderedProjects.iterator(); i.hasNext();) { + IProject proj = (IProject)i.next(); + monitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.searching_for_errors_in") //$NON-NLS-1$ + + proj.getName()); + compileErrorsInProjs = existsErrors(proj); if (compileErrorsInProjs) { - IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(promptStatus); - if (prompter != null) { - continueLaunch = ((Boolean)prompter.handleStatus(complileErrorPromptStatus, null)).booleanValue(); - } + break; + } + } + + //check current project, if prerequite projects were ok + if (!compileErrorsInProjs) { + monitor.subTask(LaunchMessages.getString("AbstractCLaunchDelegate.searching_for_errors_in") //$NON-NLS-1$ + + project.getName()); + compileErrorsInProjs = existsErrors(project); + } + + //if compile errors exist, ask the user before continuing. + if (compileErrorsInProjs) { + IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(promptStatus); + if (prompter != null) { + continueLaunch = ((Boolean)prompter.handleStatus(complileErrorPromptStatus, null)).booleanValue(); } } - return continueLaunch; - } finally { - monitor.done(); } + return continueLaunch; } /**