Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 79213 Details for
Bug 204475
Build failure causes all builds to be canceled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
better fix
204475.patch (text/plain), 8.67 KB, created by
Michael Rennie
on 2007-09-26 11:24:04 EDT
(
hide
)
Description:
better fix
Filename:
MIME Type:
Creator:
Michael Rennie
Created:
2007-09-26 11:24:04 EDT
Size:
8.67 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.debug.core >Index: core/org/eclipse/debug/internal/core/LaunchConfiguration.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchConfiguration.java,v >retrieving revision 1.107 >diff -u -r1.107 LaunchConfiguration.java >--- core/org/eclipse/debug/internal/core/LaunchConfiguration.java 29 Aug 2007 19:53:26 -0000 1.107 >+++ core/org/eclipse/debug/internal/core/LaunchConfiguration.java 26 Sep 2007 15:20:07 -0000 >@@ -611,11 +611,18 @@ > * @see org.eclipse.debug.core.ILaunchConfiguration#launch(java.lang.String, org.eclipse.core.runtime.IProgressMonitor, boolean, boolean) > */ > public ILaunch launch(String mode, IProgressMonitor monitor, boolean build, boolean register) throws CoreException { >+ IProgressMonitor launchmonitor = null; > if (monitor == null) { >- monitor = new NullProgressMonitor(); >+ launchmonitor = new NullProgressMonitor(); >+ } >+ else { >+ //like other uses, the job manager for example, we cannot assume that the monitor has been started prior to being passed into this method >+ //therefore we must start it and end it in this scope >+ monitor.beginTask(IInternalDebugCoreConstants.EMPTY_STRING, 1); >+ launchmonitor = new SubProgressMonitor(monitor, 1); > } > /* Setup progress monitor >- * - Prepare delegate (0) >+ * - Prepare delegate (1) > * - Pre-launch check (1) > * - [Build before launch (7)] if build > * - [Incremental build before launch (3)] if build >@@ -623,12 +630,12 @@ > * - Initialize source locator (1) > * - Launch delegate (10) */ > if (build) { >- monitor.beginTask("", 23); //$NON-NLS-1$ >+ launchmonitor.beginTask(IInternalDebugCoreConstants.EMPTY_STRING, 24); > } > else { >- monitor.beginTask("", 13); //$NON-NLS-1$ >+ launchmonitor.beginTask(IInternalDebugCoreConstants.EMPTY_STRING, 14); > } >- monitor.subTask(DebugCoreMessages.LaunchConfiguration_9); >+ launchmonitor.subTask(DebugCoreMessages.LaunchConfiguration_9); > try { > // bug 28245 - force the delegate to load in case it is interested in launch notifications > Set modes = getModes(); >@@ -638,7 +645,6 @@ > if (delegates.length == 1) { > delegate = delegates[0].getDelegate(); > } else if (delegates.length == 0) { >- monitor.setCanceled(true); > IStatusHandler handler = DebugPlugin.getDefault().getStatusHandler(promptStatus); > if (handler != null) { > handler.handleStatus(delegateNotAvailable, new Object[] {this, mode}); >@@ -665,13 +671,11 @@ > delegate = del.getDelegate(); > } > else { >- monitor.setCanceled(true); > status = new Status(IStatus.CANCEL, DebugPlugin.getUniqueIdentifier(), DebugPlugin.ERROR, DebugCoreMessages.LaunchConfiguration_13, null); > throw new CoreException(status); > } > } > else { >- monitor.setCanceled(true); > status = new Status(IStatus.CANCEL, DebugPlugin.getUniqueIdentifier(), DebugPlugin.ERROR, DebugCoreMessages.LaunchConfiguration_13, null); > throw new CoreException(status); > } >@@ -680,7 +684,7 @@ > delegate = del.getDelegate(); > } > } >- >+ launchmonitor.worked(1); > ILaunchConfigurationDelegate2 delegate2 = null; > if (delegate instanceof ILaunchConfigurationDelegate2) { > delegate2 = (ILaunchConfigurationDelegate2) delegate; >@@ -707,23 +711,21 @@ > launch.setAttribute(DebugPlugin.ATTR_CAPTURE_OUTPUT, null); > } > launch.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING, getLaunchManager().getEncoding(this)); >- >+ launchmonitor.worked(1); >+ > // perform initial pre-launch sanity checks >- monitor.subTask(DebugCoreMessages.LaunchConfiguration_8); >- >+ launchmonitor.subTask(DebugCoreMessages.LaunchConfiguration_8); > if (delegate2 != null) { >- if (!(delegate2.preLaunchCheck(this, mode, new SubProgressMonitor(monitor, 1)))) { >- // canceled >- monitor.setCanceled(true); >+ if (!(delegate2.preLaunchCheck(this, mode, new SubProgressMonitor(launchmonitor, 1)))) { > return launch; > } > } > else { >- monitor.worked(1); /* No pre-launch-check */ >+ launchmonitor.worked(1); /* No pre-launch-check */ > } > // perform pre-launch build > if (build) { >- IProgressMonitor buildMonitor = new SubProgressMonitor(monitor, 10, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK); >+ IProgressMonitor buildMonitor = new SubProgressMonitor(launchmonitor, 10, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK); > buildMonitor.beginTask(DebugCoreMessages.LaunchConfiguration_7, 10); > buildMonitor.subTask(DebugCoreMessages.LaunchConfiguration_6); > if (delegate2 != null) { >@@ -738,16 +740,14 @@ > } > } > // final validation >- monitor.subTask(DebugCoreMessages.LaunchConfiguration_4); >+ launchmonitor.subTask(DebugCoreMessages.LaunchConfiguration_4); > if (delegate2 != null) { >- if (!(delegate2.finalLaunchCheck(this, mode, new SubProgressMonitor(monitor, 1)))) { >- // canceled >- monitor.setCanceled(true); >+ if (!(delegate2.finalLaunchCheck(this, mode, new SubProgressMonitor(launchmonitor, 1)))) { > return launch; > } > } > else { >- monitor.worked(1); /* No validation */ >+ launchmonitor.worked(1); /* No validation */ > } > if (register) { > getLaunchManager().addLaunch(launch); >@@ -755,28 +755,31 @@ > > try { > //initialize the source locator >- monitor.subTask(DebugCoreMessages.LaunchConfiguration_3); >+ launchmonitor.subTask(DebugCoreMessages.LaunchConfiguration_3); > initializeSourceLocator(launch); >- monitor.worked(1); >+ launchmonitor.worked(1); > > /* Launch the delegate */ >- monitor.subTask(DebugCoreMessages.LaunchConfiguration_2); >- delegate.launch(this, mode, launch, new SubProgressMonitor(monitor, 10)); >+ launchmonitor.subTask(DebugCoreMessages.LaunchConfiguration_2); >+ delegate.launch(this, mode, launch, new SubProgressMonitor(launchmonitor, 10)); > } catch (CoreException e) { > // if there was an exception, and the launch is empty, remove it > if (!launch.hasChildren()) { > getLaunchManager().removeLaunch(launch); > } >- monitor.setCanceled(true); > throw e; > } >- if (monitor.isCanceled()) { >+ if (launchmonitor.isCanceled()) { > getLaunchManager().removeLaunch(launch); > } > return launch; > } > finally { >- monitor.done(); >+ if(monitor != null) { >+ //if it is not null we have started it, so we have to end it >+ monitor.done(); >+ } >+ launchmonitor.done(); > } > } > >#P org.eclipse.debug.ui >Index: ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java,v >retrieving revision 1.302 >diff -u -r1.302 DebugUIPlugin.java >--- ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java 23 Aug 2007 15:52:14 -0000 1.302 >+++ ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java 26 Sep 2007 15:20:08 -0000 >@@ -47,7 +47,6 @@ > import org.eclipse.debug.core.ILaunchListener; > import org.eclipse.debug.core.IStatusHandler; > import org.eclipse.debug.core.Launch; >-import org.eclipse.debug.internal.core.IInternalDebugCoreConstants; > import org.eclipse.debug.internal.ui.contextlaunching.LaunchingResourceManager; > import org.eclipse.debug.internal.ui.launchConfigurations.ClosedProjectFilter; > import org.eclipse.debug.internal.ui.launchConfigurations.DeletedProjectFilter; >@@ -818,20 +817,7 @@ > * @return resulting launch or <code>null</code> if user cancels > */ > public static ILaunch buildAndLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException { >- boolean buildBeforeLaunch = getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH); >- >- monitor.beginTask(IInternalDebugCoreConstants.EMPTY_STRING, 1); >- try >- { >- return configuration.launch( >- mode, >- new SubProgressMonitor(monitor, 1), >- buildBeforeLaunch); >- } >- finally >- { >- monitor.done(); >- } >+ return configuration.launch(mode, monitor, getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_BUILD_BEFORE_LAUNCH)); > } > > /** >@@ -909,7 +895,7 @@ > * - Build & launch (1) */ > monitor.beginTask(MessageFormat.format(DebugUIMessages.DebugUIPlugin_25, new Object[] {configuration.getName()}), 1); > try { >- buildAndLaunch(configuration, mode, new SubProgressMonitor(monitor, 1)); >+ buildAndLaunch(configuration, mode, new SubProgressMonitor(monitor, 98)); > } > catch (CoreException e) { > throw new InvocationTargetException(e);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 204475
:
79092
| 79213