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); |