aboutsummaryrefslogtreecommitdiff
path: root/src/delombok
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2010-11-10 01:27:00 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2010-11-10 01:27:00 +0100
commit2bc8ad4dfd6e34e15f2bd7a661d62bc26cc13379 (patch)
treec95c530cc11c1e7925794204ab13d35348e079b1 /src/delombok
parentd02a0f823fb5922ddc2e29e62cc0359be3fce0a8 (diff)
downloadlombok-2bc8ad4dfd6e34e15f2bd7a661d62bc26cc13379.tar.gz
lombok-2bc8ad4dfd6e34e15f2bd7a661d62bc26cc13379.tar.bz2
lombok-2bc8ad4dfd6e34e15f2bd7a661d62bc26cc13379.zip
'val' now fully works on javac, even when referring to lombok-generated code, by (ab)using the annotation processor's round system. This breaks delombok though. That'll have to be fixed next.
Diffstat (limited to 'src/delombok')
-rw-r--r--src/delombok/lombok/delombok/Delombok.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java
index 846b448f..95ceb309 100644
--- a/src/delombok/lombok/delombok/Delombok.java
+++ b/src/delombok/lombok/delombok/Delombok.java
@@ -384,7 +384,8 @@ public class Delombok {
for (JCCompilationUnit unit : roots) {
// Run one single massive transform instead of a lot of singleton calls, as this causes a heck of a lot of refilling of the enter cache.
- boolean changed = new JavacTransformer(messager).transform(context, Collections.singletonList(unit));
+ // XXX This isn't enough - we need to call transform again after resetting everything.
+ boolean changed = new JavacTransformer(messager).transform(false, context, Collections.singletonList(unit));
DelombokResult result = new DelombokResult(commentsMap.get(unit).comments, unit, force || changed);
if (verbose) feedback.printf("File: %s [%s]\n", unit.sourcefile.getName(), result.isChanged() ? "delomboked" : "unchanged");
Writer rawWriter;