diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-05-28 19:30:34 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2011-05-30 10:50:47 +0200 |
commit | 2d9195a2296e36ce904719b63ff0e5c0321b2a74 (patch) | |
tree | 1d12cd2d471f67a7ddc53bb0d02bc09f86bbb1d9 /src/eclipseAgent | |
parent | 21cfb45696126c185ab0fcb2fd863eaf711ab6d9 (diff) | |
download | lombok-2d9195a2296e36ce904719b63ff0e5c0321b2a74.tar.gz lombok-2d9195a2296e36ce904719b63ff0e5c0321b2a74.tar.bz2 lombok-2d9195a2296e36ce904719b63ff0e5c0321b2a74.zip |
Removed the ability of lombok to run as ecj annotation processor, because
it won't actually work right; method-level generics would break.
The new way is to use -javaagent:lombok.jar=ECJ in addition to -cp lombok.jar
Diffstat (limited to 'src/eclipseAgent')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java index ccc00f5d..71fa1dc5 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchDelegate.java @@ -28,7 +28,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; +import java.util.IdentityHashMap; import java.util.List; +import java.util.Map; import java.util.Set; import lombok.core.AST.Kind; @@ -159,6 +161,9 @@ public class PatchDelegate { return null; } + private static Map<ASTNode, Object> alreadyApplied = new IdentityHashMap<ASTNode, Object>(); + private static final Object MARKER = new Object(); + private static void fillMethodBindings(CompilationUnitDeclaration cud, ClassScope scope, List<BindingTuple> methodsToDelegate) { TypeDeclaration decl = scope.referenceContext; if (decl == null) return; @@ -170,6 +175,7 @@ public class PatchDelegate { TypeBinding tb = ann.type.resolveType(decl.initializerScope); if (!charArrayEquals("lombok", tb.qualifiedPackageName())) continue; if (!charArrayEquals("Delegate", tb.qualifiedSourceName())) continue; + if (alreadyApplied.put(ann, MARKER) == MARKER) continue; List<ClassLiteralAccess> rawTypes = new ArrayList<ClassLiteralAccess>(); List<ClassLiteralAccess> excludedRawTypes = new ArrayList<ClassLiteralAccess>(); |