private void transform(File f, boolean doJob) {

		if (getAnnotations().isUpToDate(f)) {
			return;
		}

		if (!doJob) {
			filesToTransform++;
			return;
		}
		
		try {
			System.out.print("Transforming file " + f.getCanonicalPath() + "(" + (++currentFileToTransform) + "/" + filesToTransform + ")... ");
			FileVersion file = ann.newSourceFile(f.getCanonicalPath());
			ParseTree p = getJavaParser().parse(f);
			doJob(p);
			PrintWriter out = new PrintWriter(new FileWriter(getTarget(f, getTargetPath())));
			out.print(p.tree);
			out.close();
			FileUtil.copyFile(f, new File(file.mappedPath));
			System.out.println("done.");
		} catch (StackOverflowError ex) {
			System.err.println("Stack overflow while parsing file " + f.getAbsolutePath());
		} catch (Exception ex) {
			throw new RuntimeException(ex);
		}
	}