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 / +19 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 HashMap BinaryChangeNatures = new HashMap(50);
46
public static String STRUCTURAL = "STRUCTURAL"; //$NON-NLS-1$
47
public static String NON_STRUCTURAL = "NON STRUCTURAL"; //$NON-NLS-1
48
43
protected IncrementalImageBuilder(JavaBuilder javaBuilder) {
49
protected IncrementalImageBuilder(JavaBuilder javaBuilder) {
44
	super(javaBuilder);
50
	super(javaBuilder);
45
	this.nameEnvironment.isIncrementalBuild = true;
51
	this.nameEnvironment.isIncrementalBuild = true;
Lines 291-296 Link Here
291
					case IResourceDelta.CHANGED :
297
					case IResourceDelta.CHANGED :
292
						if ((binaryDelta.getFlags() & IResourceDelta.CONTENT) == 0)
298
						if ((binaryDelta.getFlags() & IResourceDelta.CONTENT) == 0)
293
							return; // skip it since it really isn't changed
299
							return; // skip it since it really isn't changed
300
						// if listed amongst binary changes to ignore, then no need to react to this delta (14103)
301
						if (BinaryChangeNatures.get(resource) == NON_STRUCTURAL) {
302
							if (JavaBuilder.DEBUG)
303
								System.out.println("Skipped over unchanged class file " + typePath); //$NON-NLS-1$
304
							return; // skip it since it really isn't changed
305
						}
294
						if (JavaBuilder.DEBUG)
306
						if (JavaBuilder.DEBUG)
295
							System.out.println("Found changed class file " + typePath); //$NON-NLS-1$
307
							System.out.println("Found changed class file " + typePath); //$NON-NLS-1$
296
						addDependentsOf(typePath, false);
308
						addDependentsOf(typePath, false);
Lines 602-608 Link Here
602
protected boolean writeClassFileCheck(IFile file, String fileName, byte[] newBytes) throws CoreException {
614
protected boolean writeClassFileCheck(IFile file, String fileName, byte[] newBytes) throws CoreException {
603
	try {
615
	try {
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 616-622 Link Here
616
		if (!(reader.isLocal() || reader.isAnonymous()) && reader.hasStructuralChanges(newBytes)) {
628
		if (!(reader.isLocal() || reader.isAnonymous()) && reader.hasStructuralChanges(newBytes)) {
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$
631
			BinaryChangeNatures.put(file, STRUCTURAL);
619
			addDependentsOf(new Path(fileName), true);
632
			addDependentsOf(new Path(fileName), true);
633
		} else {
634
			// dependent projects may ignore a change to this file since wasn't structural (14103)
635
			if (BinaryChangeNatures.get(file) != STRUCTURAL) {			
636
				BinaryChangeNatures.put(file, NON_STRUCTURAL);
637
			}
620
		}
638
		}
621
	} catch (ClassFormatException e) {
639
	} catch (ClassFormatException e) {
622
		addDependentsOf(new Path(fileName), true);
640
		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.BinaryChangeNatures.clear();
80
}
81
}
81
82
82
public static void removeProblemsFor(IResource resource) {
83
public static void removeProblemsFor(IResource resource) {

Return to bug 14103