diff options
author | Reinier Zwitserloot <reinier@tipit.to> | 2009-10-13 00:01:52 +0200 |
---|---|---|
committer | Reinier Zwitserloot <reinier@tipit.to> | 2009-10-13 00:01:52 +0200 |
commit | e835daa9d7420c28b28d47af364ad356bf849131 (patch) | |
tree | 132e4be4596acdc93ec643a94763d3c262a5b8cb /src_eclipseagent/lombok/eclipse/agent | |
parent | 2249fa4064b99af6e6d5585c501e8d402490b681 (diff) | |
download | lombok-e835daa9d7420c28b28d47af364ad356bf849131.tar.gz lombok-e835daa9d7420c28b28d47af364ad356bf849131.tar.bz2 lombok-e835daa9d7420c28b28d47af364ad356bf849131.zip |
The ORIGINAL flag seems to be some sort of 'generated code' marker, and it does do something, but not enough. Still, we clear it, for the little good it does do.
Diffstat (limited to 'src_eclipseagent/lombok/eclipse/agent')
-rw-r--r-- | src_eclipseagent/lombok/eclipse/agent/PatchFixes.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src_eclipseagent/lombok/eclipse/agent/PatchFixes.java b/src_eclipseagent/lombok/eclipse/agent/PatchFixes.java index e0d21f90..a1cd4706 100644 --- a/src_eclipseagent/lombok/eclipse/agent/PatchFixes.java +++ b/src_eclipseagent/lombok/eclipse/agent/PatchFixes.java @@ -5,6 +5,7 @@ import java.util.ArrayList; import java.util.List; import org.eclipse.jdt.core.IMethod; +import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.SimpleName; public class PatchFixes { @@ -26,7 +27,10 @@ public class PatchFixes { public static void setIsGeneratedFlag(org.eclipse.jdt.core.dom.ASTNode domNode, org.eclipse.jdt.internal.compiler.ast.ASTNode internalNode) throws Exception { boolean isGenerated = internalNode.getClass().getField("$generatedBy").get(internalNode) != null; - if (isGenerated) domNode.getClass().getField("$isGenerated").set(domNode, true); + if (isGenerated) { + domNode.getClass().getField("$isGenerated").set(domNode, true); + domNode.setFlags(domNode.getFlags() & ~ASTNode.ORIGINAL); + } } public static void setIsGeneratedFlagForSimpleName(SimpleName name, Object internalNode) throws Exception { |