diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-09-26 09:00:12 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-09-26 09:00:12 +0200 |
commit | 27a3efeb1cb6f79ecefc6e641ba78de6d69406c3 (patch) | |
tree | 9f9ff237442b0a00e62decbb91fc6d331b277878 /src_eclipseagent/java/lombok | |
parent | 35691e83edffdadd5ef438793eec9c968e8bfd35 (diff) | |
download | lombok-27a3efeb1cb6f79ecefc6e641ba78de6d69406c3.tar.gz lombok-27a3efeb1cb6f79ecefc6e641ba78de6d69406c3.tar.bz2 lombok-27a3efeb1cb6f79ecefc6e641ba78de6d69406c3.zip |
Rewrite of the eclipse agent to use the new lombok.patcher project.
Diffstat (limited to 'src_eclipseagent/java/lombok')
-rw-r--r-- | src_eclipseagent/java/lombok/eclipse/ClassLoaderWorkaround.java | 4 | ||||
-rw-r--r-- | src_eclipseagent/java/lombok/eclipse/PatchFixes.java | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src_eclipseagent/java/lombok/eclipse/ClassLoaderWorkaround.java b/src_eclipseagent/java/lombok/eclipse/ClassLoaderWorkaround.java index f5c8bbd3..3d8e9ec9 100644 --- a/src_eclipseagent/java/lombok/eclipse/ClassLoaderWorkaround.java +++ b/src_eclipseagent/java/lombok/eclipse/ClassLoaderWorkaround.java @@ -52,6 +52,10 @@ public class ClassLoaderWorkaround { private static final Map<ClassLoader, Method> transform = new HashMap<ClassLoader, Method>(); + public static void transformCompilationUnitDeclarationSwapped(Object cud, Object parser) throws Exception { + transformCompilationUnitDeclaration(parser, cud); + } + public static void transformCompilationUnitDeclaration(Object parser, Object cud) throws Exception { Method transformMethod = getTransformMethod(cud); try { diff --git a/src_eclipseagent/java/lombok/eclipse/PatchFixes.java b/src_eclipseagent/java/lombok/eclipse/PatchFixes.java new file mode 100644 index 00000000..23c60d32 --- /dev/null +++ b/src_eclipseagent/java/lombok/eclipse/PatchFixes.java @@ -0,0 +1,14 @@ +package java.lombok.eclipse; + +public class PatchFixes { + public static int fixRetrieveStartingCatchPosition(int in) { + return in; + } + + private static final int BIT24 = 0x800000; + + public static boolean checkBit24(Object node) throws Exception { + int bits = (Integer)(node.getClass().getField("bits").get(node)); + return (bits & BIT24) != 0; + } +} |