View | Details | Raw Unified | Return to bug 14103 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/IteratorForStatement.java (-1 / +2 lines)
Lines 79-85 Link Here
79
	public void resetStateForCodeGeneration() {
79
	public void resetStateForCodeGeneration() {
80
		// TODO to be completed
80
		// TODO to be completed
81
	}
81
	}
82
82
private void dummy() {
83
}
83
	public void resolve(BlockScope upperScope) {
84
	public void resolve(BlockScope upperScope) {
84
		// TODO to be completed
85
		// TODO to be completed
85
	}
86
	}
(-)model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java (-1 / +16 lines)
Lines 40-45 Link Here
40
40
41
public static int MaxCompileLoop = 5; // perform a full build if it takes more than ? incremental compile loops
41
public static int MaxCompileLoop = 5; // perform a full build if it takes more than ? incremental compile loops
42
42
43
// Global table containing list of binary changes which are non structural. Used to optimize inter-project scenario (refine binary deltas)
44
// Flushed at the end of a build iteration, thus only optimizing the incremental workspace build.
45
public static HashSet BinaryChangesToIgnore = new HashSet(50);
46
43
protected IncrementalImageBuilder(JavaBuilder javaBuilder) {
47
protected IncrementalImageBuilder(JavaBuilder javaBuilder) {
44
	super(javaBuilder);
48
	super(javaBuilder);
45
	this.nameEnvironment.isIncrementalBuild = true;
49
	this.nameEnvironment.isIncrementalBuild = true;
Lines 291-296 Link Here
291
					case IResourceDelta.CHANGED :
295
					case IResourceDelta.CHANGED :
292
						if ((binaryDelta.getFlags() & IResourceDelta.CONTENT) == 0)
296
						if ((binaryDelta.getFlags() & IResourceDelta.CONTENT) == 0)
293
							return; // skip it since it really isn't changed
297
							return; // skip it since it really isn't changed
298
						// if listed amongst binary changes to ignore, then no need to react to this delta (14103)
299
						if (BinaryChangesToIgnore.contains(resource)) {
300
							if (JavaBuilder.DEBUG)
301
								System.out.println("Skipped over unchanged class file " + typePath); //$NON-NLS-1$
302
							return; // skip it since it really isn't changed
303
						}
294
						if (JavaBuilder.DEBUG)
304
						if (JavaBuilder.DEBUG)
295
							System.out.println("Found changed class file " + typePath); //$NON-NLS-1$
305
							System.out.println("Found changed class file " + typePath); //$NON-NLS-1$
296
						addDependentsOf(typePath, false);
306
						addDependentsOf(typePath, false);
Lines 601-608 Link Here
601
611
602
protected boolean writeClassFileCheck(IFile file, String fileName, byte[] newBytes) throws CoreException {
612
protected boolean writeClassFileCheck(IFile file, String fileName, byte[] newBytes) throws CoreException {
603
	try {
613
	try {
614
		// flush info for this file in case of several incremental loops
615
		BinaryChangesToIgnore.remove(file);		
604
		byte[] oldBytes = Util.getResourceContentsAsByteArray(file);
616
		byte[] oldBytes = Util.getResourceContentsAsByteArray(file);
605
		if (this.compileLoop > 1) { // only optimize files which were recompiled during the dependent pass, see 33990
617
		if (this.compileLoop > 1) { // only optimize files which were recompiled during the dependent pass, see 33990 (update timestamp)
606
			notEqual : if (newBytes.length == oldBytes.length) {
618
			notEqual : if (newBytes.length == oldBytes.length) {
607
				for (int i = newBytes.length; --i >= 0;)
619
				for (int i = newBytes.length; --i >= 0;)
608
					if (newBytes[i] != oldBytes[i]) break notEqual;
620
					if (newBytes[i] != oldBytes[i]) break notEqual;
Lines 617-622 Link Here
617
			if (JavaBuilder.DEBUG)
629
			if (JavaBuilder.DEBUG)
618
				System.out.println("Type has structural changes " + fileName); //$NON-NLS-1$
630
				System.out.println("Type has structural changes " + fileName); //$NON-NLS-1$
619
			addDependentsOf(new Path(fileName), true);
631
			addDependentsOf(new Path(fileName), true);
632
		} else {
633
			// dependent projects may ignore a change to this file since wasn't structural (14103)
634
			BinaryChangesToIgnore.add(file);
620
		}
635
		}
621
	} catch (ClassFormatException e) {
636
	} catch (ClassFormatException e) {
622
		addDependentsOf(new Path(fileName), true);
637
		addDependentsOf(new Path(fileName), true);
(-)model/org/eclipse/jdt/internal/core/builder/JavaBuilder.java (-1 / +2 lines)
Lines 68-74 Link Here
68
 */
68
 */
69
public static void buildStarting() {
69
public static void buildStarting() {
70
	// do nothing
70
	// do nothing
71
	// TODO (philippe) is it still needed?
72
}
71
}
73
72
74
/**
73
/**
Lines 77-82 Link Here
77
 */
76
 */
78
public static void buildFinished() {
77
public static void buildFinished() {
79
	BuildNotifier.resetProblemCounters();
78
	BuildNotifier.resetProblemCounters();
79
	// discard information about binary changes at the end of a build iteration
80
	IncrementalImageBuilder.BinaryChangesToIgnore.clear();
80
}
81
}
81
82
82
public static void removeProblemsFor(IResource resource) {
83
public static void removeProblemsFor(IResource resource) {

Return to bug 14103