Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2013-07-17 06:19:15 +0000
committerJayaprakash Arthanareeswaran2013-07-17 06:37:27 +0000
commit96664117f15bd200f9af9b64cc7dc4287b6e7762 (patch)
tree644b28efdc3e9f404a6ba284340f3d082d534a45
parent001501313b8d383d57f3b797fccbc8abbe8277e0 (diff)
downloadeclipse.jdt.core-96664117f15bd200f9af9b64cc7dc4287b6e7762.tar.gz
eclipse.jdt.core-96664117f15bd200f9af9b64cc7dc4287b6e7762.tar.xz
eclipse.jdt.core-96664117f15bd200f9af9b64cc7dc4287b6e7762.zip
Fix for bug 413083 - Builder debug info: wrongly accuses user ofM20130724-0800M20130717-0800
requesting a full build Signed-off-by: Dani Megert <daniel_megert@ch.ibm.com>
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java68
1 files changed, 34 insertions, 34 deletions
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java
index a97dc6dd1d..531cbb6c62 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 IBM Corporation 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
@@ -157,7 +157,7 @@ protected IProject[] build(int kind, Map ignored, IProgressMonitor monitor) thro
if (this.currentProject == null || !this.currentProject.isAccessible()) return new IProject[0];
if (DEBUG)
- System.out.println("\nStarting build of " + this.currentProject.getName() //$NON-NLS-1$
+ System.out.println("\nJavaBuilder: Starting build of " + this.currentProject.getName() //$NON-NLS-1$
+ " @ " + new Date(System.currentTimeMillis())); //$NON-NLS-1$
this.notifier = new BuildNotifier(monitor, this.currentProject);
this.notifier.begin();
@@ -169,39 +169,39 @@ protected IProject[] build(int kind, Map ignored, IProgressMonitor monitor) thro
if (isWorthBuilding()) {
if (kind == FULL_BUILD) {
if (DEBUG)
- System.out.println("Performing full build as requested by user"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Performing full build as requested"); //$NON-NLS-1$
buildAll();
} else {
if ((this.lastState = getLastState(this.currentProject)) == null) {
if (DEBUG)
- System.out.println("Performing full build since last saved state was not found"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Performing full build since last saved state was not found"); //$NON-NLS-1$
buildAll();
} else if (hasClasspathChanged()) {
// if the output location changes, do not delete the binary files from old location
// the user may be trying something
if (DEBUG)
- System.out.println("Performing full build since classpath has changed"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Performing full build since classpath has changed"); //$NON-NLS-1$
buildAll();
} else if (this.nameEnvironment.sourceLocations.length > 0) {
// if there is no source to compile & no classpath changes then we are done
SimpleLookupTable deltas = findDeltas();
if (deltas == null) {
if (DEBUG)
- System.out.println("Performing full build since deltas are missing after incremental request"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Performing full build since deltas are missing after incremental request"); //$NON-NLS-1$
buildAll();
} else if (deltas.elementSize > 0) {
buildDeltas(deltas);
} else if (DEBUG) {
- System.out.println("Nothing to build since deltas were empty"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Nothing to build since deltas were empty"); //$NON-NLS-1$
}
} else {
if (hasStructuralDelta()) { // double check that a jar file didn't get replaced in a binary project
if (DEBUG)
- System.out.println("Performing full build since there are structural deltas"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Performing full build since there are structural deltas"); //$NON-NLS-1$
buildAll();
} else {
if (DEBUG)
- System.out.println("Nothing to build since there are no source folders and no deltas"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Nothing to build since there are no source folders and no deltas"); //$NON-NLS-1$
this.lastState.tagAsNoopBuild();
}
}
@@ -239,8 +239,8 @@ protected IProject[] build(int kind, Map ignored, IProgressMonitor monitor) thro
}
IProject[] requiredProjects = getRequiredProjects(true);
if (DEBUG)
- System.out.println("Finished build of " + this.currentProject.getName() //$NON-NLS-1$
- + " @ " + new Date(System.currentTimeMillis())); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Finished build of " + this.currentProject.getName() //$NON-NLS-1$
+ + " @ " + new Date(System.currentTimeMillis()) + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
return requiredProjects;
}
@@ -248,7 +248,7 @@ private void buildAll() {
this.notifier.checkCancel();
this.notifier.subTask(Messages.bind(Messages.build_preparingBuild, this.currentProject.getName()));
if (DEBUG && this.lastState != null)
- System.out.println("Clearing last state : " + this.lastState); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Clearing last state : " + this.lastState); //$NON-NLS-1$
clearLastState();
BatchImageBuilder imageBuilder = new BatchImageBuilder(this, true);
imageBuilder.build();
@@ -259,14 +259,14 @@ private void buildDeltas(SimpleLookupTable deltas) {
this.notifier.checkCancel();
this.notifier.subTask(Messages.bind(Messages.build_preparingBuild, this.currentProject.getName()));
if (DEBUG && this.lastState != null)
- System.out.println("Clearing last state : " + this.lastState); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Clearing last state : " + this.lastState); //$NON-NLS-1$
clearLastState(); // clear the previously built state so if the build fails, a full build will occur next time
IncrementalImageBuilder imageBuilder = new IncrementalImageBuilder(this);
if (imageBuilder.build(deltas)) {
recordNewState(imageBuilder.newState);
} else {
if (DEBUG)
- System.out.println("Performing full build since incremental build failed"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Performing full build since incremental build failed"); //$NON-NLS-1$
buildAll();
}
}
@@ -276,7 +276,7 @@ protected void clean(IProgressMonitor monitor) throws CoreException {
if (this.currentProject == null || !this.currentProject.isAccessible()) return;
if (DEBUG)
- System.out.println("\nCleaning " + this.currentProject.getName() //$NON-NLS-1$
+ System.out.println("\nJavaBuilder: Cleaning " + this.currentProject.getName() //$NON-NLS-1$
+ " @ " + new Date(System.currentTimeMillis())); //$NON-NLS-1$
this.notifier = new BuildNotifier(monitor, this.currentProject);
this.notifier.begin();
@@ -285,7 +285,7 @@ protected void clean(IProgressMonitor monitor) throws CoreException {
initializeBuilder(CLEAN_BUILD, true);
if (DEBUG)
- System.out.println("Clearing last state as part of clean : " + this.lastState); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Clearing last state as part of clean : " + this.lastState); //$NON-NLS-1$
clearLastState();
removeProblemsAndTasksFor(this.currentProject);
new BatchImageBuilder(this, false).cleanOutputFolders(false);
@@ -297,7 +297,7 @@ protected void clean(IProgressMonitor monitor) throws CoreException {
cleanup();
}
if (DEBUG)
- System.out.println("Finished cleaning " + this.currentProject.getName() //$NON-NLS-1$
+ System.out.println("JavaBuilder: Finished cleaning " + this.currentProject.getName() //$NON-NLS-1$
+ " @ " + new Date(System.currentTimeMillis())); //$NON-NLS-1$
}
@@ -366,12 +366,12 @@ private SimpleLookupTable findDeltas() {
if (delta != null) {
if (delta.getKind() != IResourceDelta.NO_CHANGE) {
if (DEBUG)
- System.out.println("Found source delta for: " + this.currentProject.getName()); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Found source delta for: " + this.currentProject.getName()); //$NON-NLS-1$
deltas.put(this.currentProject, delta);
}
} else {
if (DEBUG)
- System.out.println("Missing delta for: " + this.currentProject.getName()); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Missing delta for: " + this.currentProject.getName()); //$NON-NLS-1$
this.notifier.subTask(""); //$NON-NLS-1$
return null;
}
@@ -401,12 +401,12 @@ private SimpleLookupTable findDeltas() {
if (delta != null) {
if (delta.getKind() != IResourceDelta.NO_CHANGE) {
if (DEBUG)
- System.out.println("Found binary delta for: " + p.getName()); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Found binary delta for: " + p.getName()); //$NON-NLS-1$
deltas.put(p, delta);
}
} else {
if (DEBUG)
- System.out.println("Missing delta for: " + p.getName()); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Missing delta for: " + p.getName()); //$NON-NLS-1$
this.notifier.subTask(""); //$NON-NLS-1$
return null;
}
@@ -494,7 +494,7 @@ private boolean hasClasspathChanged() {
} catch (CoreException ignore) { // skip it
}
if (DEBUG) {
- System.out.println("New location: " + newSourceLocations[n] + "\n!= old location: " + oldSourceLocations[o]); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out.println("JavaBuilder: New location: " + newSourceLocations[n] + "\n!= old location: " + oldSourceLocations[o]); //$NON-NLS-1$ //$NON-NLS-2$
printLocations(newSourceLocations, oldSourceLocations);
}
return true;
@@ -508,7 +508,7 @@ private boolean hasClasspathChanged() {
} catch (CoreException ignore) { // skip it
}
if (DEBUG) {
- System.out.println("Added non-empty source folder"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Added non-empty source folder"); //$NON-NLS-1$
printLocations(newSourceLocations, oldSourceLocations);
}
return true;
@@ -519,7 +519,7 @@ private boolean hasClasspathChanged() {
continue;
}
if (DEBUG) {
- System.out.println("Removed non-empty source folder"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Removed non-empty source folder"); //$NON-NLS-1$
printLocations(newSourceLocations, oldSourceLocations);
}
return true;
@@ -532,14 +532,14 @@ private boolean hasClasspathChanged() {
for (n = o = 0; n < newLength && o < oldLength; n++, o++) {
if (newBinaryLocations[n].equals(oldBinaryLocations[o])) continue;
if (DEBUG) {
- System.out.println("New location: " + newBinaryLocations[n] + "\n!= old location: " + oldBinaryLocations[o]); //$NON-NLS-1$ //$NON-NLS-2$
+ System.out.println("JavaBuilder: New location: " + newBinaryLocations[n] + "\n!= old location: " + oldBinaryLocations[o]); //$NON-NLS-1$ //$NON-NLS-2$
printLocations(newBinaryLocations, oldBinaryLocations);
}
return true;
}
if (n < newLength || o < oldLength) {
if (DEBUG) {
- System.out.println("Number of binary folders/jar files has changed:"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Number of binary folders/jar files has changed:"); //$NON-NLS-1$
printLocations(newBinaryLocations, oldBinaryLocations);
}
return true;
@@ -648,7 +648,7 @@ private boolean isWorthBuilding() throws CoreException {
// Abort build only if there are classpath errors
if (isClasspathBroken(this.javaProject.getRawClasspath(), this.currentProject)) {
if (DEBUG)
- System.out.println("Aborted build because project has classpath errors (incomplete or involved in cycle)"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Aborted build because project has classpath errors (incomplete or involved in cycle)"); //$NON-NLS-1$
removeProblemsAndTasksFor(this.currentProject); // remove all compilation problems
@@ -678,18 +678,18 @@ private boolean isWorthBuilding() throws CoreException {
JavaProject prereq = (JavaProject) JavaCore.create(p);
if (prereq.hasCycleMarker() && JavaCore.WARNING.equals(this.javaProject.getOption(JavaCore.CORE_CIRCULAR_CLASSPATH, true))) {
if (DEBUG)
- System.out.println("Continued to build even though prereq project " + p.getName() //$NON-NLS-1$
+ System.out.println("JavaBuilder: Continued to build even though prereq project " + p.getName() //$NON-NLS-1$
+ " was not built since its part of a cycle"); //$NON-NLS-1$
continue;
}
if (!hasJavaBuilder(p)) {
if (DEBUG)
- System.out.println("Continued to build even though prereq project " + p.getName() //$NON-NLS-1$
+ System.out.println("JavaBuilder: Continued to build even though prereq project " + p.getName() //$NON-NLS-1$
+ " is not built by JavaBuilder"); //$NON-NLS-1$
continue;
}
if (DEBUG)
- System.out.println("Aborted build because prereq project " + p.getName() //$NON-NLS-1$
+ System.out.println("JavaBuilder: Aborted build because prereq project " + p.getName() //$NON-NLS-1$
+ " was not built"); //$NON-NLS-1$
removeProblemsAndTasksFor(this.currentProject); // make this the only problem for this project
@@ -726,7 +726,7 @@ void mustPropagateStructuralChanges() {
IProject project = this.workspaceRoot.getProject(participantPath.segment(0));
if (hasBeenBuilt(project)) {
if (DEBUG)
- System.out.println("Requesting another build iteration since cycle participant " + project.getName() //$NON-NLS-1$
+ System.out.println("JavaBuilder: Requesting another build iteration since cycle participant " + project.getName() //$NON-NLS-1$
+ " has not yet seen some structural changes"); //$NON-NLS-1$
needRebuild();
return;
@@ -736,10 +736,10 @@ void mustPropagateStructuralChanges() {
}
private void printLocations(ClasspathLocation[] newLocations, ClasspathLocation[] oldLocations) {
- System.out.println("New locations:"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: New locations:"); //$NON-NLS-1$
for (int i = 0, length = newLocations.length; i < length; i++)
System.out.println(" " + newLocations[i].debugPathString()); //$NON-NLS-1$
- System.out.println("Old locations:"); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Old locations:"); //$NON-NLS-1$
for (int i = 0, length = oldLocations.length; i < length; i++)
System.out.println(" " + oldLocations[i].debugPathString()); //$NON-NLS-1$
}
@@ -753,7 +753,7 @@ private void recordNewState(State state) {
}
if (DEBUG)
- System.out.println("Recording new state : " + state); //$NON-NLS-1$
+ System.out.println("JavaBuilder: Recording new state : " + state); //$NON-NLS-1$
// state.dump();
JavaModelManager.getJavaModelManager().setLastBuiltState(this.currentProject, state);
}

Back to the top