diff options
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index c4889bb6..88518337 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -61,6 +61,7 @@ public class EclipsePatcher extends Agent { if (!ecjOnly) { patchLombokizeAST(sm); patchCatchReparse(sm); + patchIdentifierEndReparse(sm); patchSetGeneratedFlag(sm); patchHideGeneratedNodes(sm); patchLiveDebug(sm); @@ -143,6 +144,13 @@ public class EclipsePatcher extends Agent { .transplant().request(StackRequest.PARAM1).build()); } + private static void patchIdentifierEndReparse(ScriptManager sm) { + sm.addScript(ScriptBuilder.wrapReturnValue() + .target(new MethodTarget("org.eclipse.jdt.core.dom.ASTConverter", "retrieveIdentifierEndPosition")) + .wrapMethod(new Hook("lombok.eclipse.agent.PatchFixes", "fixRetrieveIdentifierEndPosition", "int", "int")) + .transplant().request(StackRequest.PARAM1).build()); + } + private static void patchSetGeneratedFlag(ScriptManager sm) { sm.addScript(ScriptBuilder.addField() .targetClass("org.eclipse.jdt.internal.compiler.ast.ASTNode") |