}
public boolean incrementalBuild(AjBuildConfig buildConfig, IMessageHandler messageHandler) throws CoreException, IOException {
+ final CountingMessageHandler counter = new CountingMessageHandler(messageHandler);
try {
- currentHandler = messageHandler;
+ currentHandler = counter;
IncrementalBuilder builder = getIncrementalBuilder(messageHandler);
// SimpleLookupTable deltas =
//XXX for Mik, replace this with a call to builder.build(SimpleLookupTable deltas)
getJavaBuilder().binaryResources = new SimpleLookupTable();
SimpleLookupTable deltas = getDeltas(buildConfig);
+ //MessageUtil.info(messageHandler, "about to do incremental build: " + deltas);
+
boolean succeeded = builder.build(deltas);
+ if (counter.hasErrors()) {
+ return false;
+ }
+
if (succeeded) {
return weaveAndGenerateClassFiles(builder.getNewState());
} else {
SimpleLookupTable getDeltas(AjBuildConfig newBuildConfig) {
updateBuildConfig(newBuildConfig);
+ //System.err.println("sourceRoots: " + newBuildConfig.getSourceRoots());
// !!! support multiple source roots
SimpleLookupTable deltas = new SimpleLookupTable();
for (Iterator i = newBuildConfig.getSourceRoots().iterator(); i.hasNext(); ) {