am c15ed2d: Fix a double issue regarding interrupted builds due to pre-e

Merge commit 'c15ed2d771b4b02bab5f2a2281d08a050ee1df89'

* commit 'c15ed2d771b4b02bab5f2a2281d08a050ee1df89':
  Fix a double issue regarding interrupted builds due to pre-existing errors.
This commit is contained in:
Xavier Ducrohet
2009-05-14 11:36:50 -07:00
committed by The Android Open Source Project
2 changed files with 147 additions and 134 deletions

View File

@@ -570,7 +570,7 @@ public class ApkBuilder extends BaseBuilder {
// first check if this is a CoreException we threw to cancel the build.
if (exception instanceof CoreException) {
if (((CoreException)exception).getStatus().getCode() == IStatus.CANCEL) {
if (((CoreException)exception).getStatus().getSeverity() == IStatus.CANCEL) {
// Project is already marked with an error. Nothing to do
return referencedProjects;
}
@@ -1198,4 +1198,17 @@ public class ApkBuilder extends BaseBuilder {
String name = folder.getName();
return JavaResourceFilter.checkFolderForPackaging(name);
}
@Override
protected void abortOnBadSetup(IProject project) throws CoreException {
super.abortOnBadSetup(project);
// for this version, we stop on any marker (ie also markers coming from JDT)
IMarker[] markers = project.findMarkers(null /*type*/, false /*includeSubtypes*/,
IResource.DEPTH_ZERO);
if (markers.length > 0) {
stopBuild("");
}
}
}

View File

@@ -886,7 +886,7 @@ abstract class BaseBuilder extends IncrementalProjectBuilder {
* @param project The {@link IJavaProject} being compiled.
* @throws CoreException
*/
protected final void abortOnBadSetup(IProject project) throws CoreException {
protected void abortOnBadSetup(IProject project) throws CoreException {
// check if we have finished loading the SDK.
if (AdtPlugin.getDefault().getSdkLoadStatus() != LoadStatus.LOADED) {
// we exit silently