Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 314308

Summary: Optimisations for AbstractCLaunchDelegate2
Product: [Tools] CDT Reporter: James Blackburn <jamesblackburn+eclipse>
Component: cdt-debugAssignee: cdt-debug-inbox <cdt-debug-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: elaskavaia.cdt, john.cortell, pawel.1.piech
Version: 7.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Bug Depends on: 309126    
Bug Blocks:    

Description James Blackburn CLA 2010-05-25 13:00:53 EDT
+++ This bug was initially created as a clone of Bug #309126 +++

There are a couple things that could be tidied (see bug 309126 comment 16 points 2 & 5).

existsProblems(...) should probably just #findMaxProblemSeverity rather than fetching and checking all the markers:

protected boolean existsProblems(IProject proj) throws CoreException {
	return proj.findMaxProblemSeverity(IMarker.PROBLEM, true, IResource.DEPTH_INFINITE) >= IMarker.SEVERITY_ERROR;
}

Build before launch shouldn't use the workspace root scheduling rule. This pre-supposes that the builders require this which they may not:
  
  ResourcesPlugin.getWorkspace().run(build, null, IWorkspace.AVOID_UPDATE, monitor);