}
CompilationUnit workingCopy = getWorkingCopy();
- // boolean wasConsistent = workingCopy.isConsistent();
- // JavaElementDeltaBuilder deltaBuilder = null;
+ boolean wasConsistent = workingCopy.isConsistent();
+ JavaElementDeltaBuilder deltaBuilder = null;
try {
// create the delta builder (this remembers the current content of
// the cu)
- // if (!wasConsistent){
- // deltaBuilder = new JavaElementDeltaBuilder(workingCopy);
- //
- // // update the element infos with the content of the working copy
- // workingCopy.makeConsistent(fMonitor);
- // deltaBuilder.buildDeltas();
- //
- // }
+ if (!wasConsistent) {
+ deltaBuilder = new JavaElementDeltaBuilder(workingCopy);
+
+ // update the element infos with the content of the working copy
+ workingCopy.makeConsistent(progressMonitor);
+ deltaBuilder.buildDeltas();
+ }
if (progressMonitor != null)
progressMonitor.worked(2);
}
// register the deltas
- // if (deltaBuilder != null){
- // if ((deltaBuilder.delta != null) &&
- // (deltaBuilder.delta.getAffectedChildren().length > 0)) {
- // addReconcileDelta(workingCopy, deltaBuilder.delta);
- // }
- // }
+ if (deltaBuilder != null) {
+ if ((deltaBuilder.delta != null)
+ && (deltaBuilder.delta.getAffectedChildren().length > 0)) {
+ addReconcileDelta(workingCopy, deltaBuilder.delta);
+ }
+ }
} finally {
if (progressMonitor != null)
progressMonitor.done();