diff options
author | Roel Spilker <r.spilker@gmail.com> | 2014-02-20 21:03:13 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2014-02-20 21:03:13 +0100 |
commit | c72e2a273233719750af0f41e842f705292888ac (patch) | |
tree | 82a06c796980172dc1b98fee0e018990cf543948 /src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | |
parent | dccbcd8f5c25f6de88137003d97c4815007c35bc (diff) | |
download | lombok-c72e2a273233719750af0f41e842f705292888ac.tar.gz lombok-c72e2a273233719750af0f41e842f705292888ac.tar.bz2 lombok-c72e2a273233719750af0f41e842f705292888ac.zip |
[suspect:eclipse] Fix for issue 633: refactor script 'extract local variable' did not work inside for example SneakyThrows-protected methods.
This fix is reverting the change in e835daa9.
During conversion of the internal.ast to the dom AST, a flag is introduced
named 'ORIGINAL'. Commit e835daa9 always explicitly cleared it for
all lombok-generated nodes, in an attempt to try and do the appropriate thing,
treating the ORIGINAL flag as a simile for 'generated code'.
Unfortunately, for eclipse code analysis, all our generated code should be
treated as if it's "really" there, and in general this doesn't work because
eclipse's concept of 'generated' applies to explicit super() calls and the like,
not the kind of stuff lombok introduces.
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index d4b8c763..2370d3ff 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -256,10 +256,7 @@ public class PatchFixes { org.eclipse.jdt.internal.compiler.ast.ASTNode internalNode) throws Exception { if (internalNode == null || domNode == null) return; boolean isGenerated = internalNode.getClass().getField("$generatedBy").get(internalNode) != null; - if (isGenerated) { - domNode.getClass().getField("$isGenerated").set(domNode, true); - domNode.setFlags(domNode.getFlags() & ~org.eclipse.jdt.core.dom.ASTNode.ORIGINAL); - } + if (isGenerated) domNode.getClass().getField("$isGenerated").set(domNode, true); } public static void setIsGeneratedFlagForName(org.eclipse.jdt.core.dom.Name name, Object internalNode) throws Exception { |