diff options
author | jvanderhel <Jappe.vanderhel@gmail.com> | 2011-11-13 00:24:36 +0100 |
---|---|---|
committer | jvanderhel <Jappe.vanderhel@gmail.com> | 2011-11-13 00:24:36 +0100 |
commit | fd736cc76f6b1b505d73173f270100161988338d (patch) | |
tree | fc4dcf4c2a4ebc699cf0348aaba27fa740bc749b /src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | |
parent | 1950820d35c1653389a22bddfa3916e125d4bc24 (diff) | |
download | lombok-fd736cc76f6b1b505d73173f270100161988338d.tar.gz lombok-fd736cc76f6b1b505d73173f270100161988338d.tar.bz2 lombok-fd736cc76f6b1b505d73173f270100161988338d.zip |
disabling lombok for all postsavelisteners proved to cause some postsave actions to make the wrong decisions.
Patching ControlStatementFinder solves the same problem, with less side effects
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index 6d5fdaec..8da7f668 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -41,6 +41,16 @@ import org.eclipse.jdt.internal.compiler.ast.Annotation; import org.eclipse.jdt.internal.core.dom.rewrite.TokenScanner; public class PatchFixes { + public static boolean isGenerated(org.eclipse.jdt.core.dom.Statement statement) { + boolean result = false; + try { + result = ((Boolean)statement.getClass().getField("$isGenerated").get(statement)).booleanValue(); + } catch (Exception e) { + // better to assume it isn't generated + } + return result; + } + public static int fixRetrieveStartingCatchPosition(int original, int start) { return original == -1 ? start : original; } |