aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
index 4c6b6618..f9b53e68 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
@@ -96,6 +96,7 @@ public class EclipsePatcher extends Agent {
patchSortMembersOperation(sm);
patchExtractInterface(sm);
patchAboutDialog(sm);
+ patchEclipseDebugPatches(sm);
} else {
patchPostCompileHookEcj(sm);
}
@@ -645,6 +646,19 @@ public class EclipsePatcher extends Agent {
.request(StackRequest.PARAM1, StackRequest.RETURN_VALUE).build());
}
+ private static void patchEclipseDebugPatches(ScriptManager sm) {
+ final String ASTNODE_SIG = "org.eclipse.jdt.core.dom.ASTNode";
+ final String PATCH_DEBUG = "lombok.eclipse.agent.PatchDiagnostics";
+
+ sm.addScript(exitEarly()
+ .target(new MethodTarget(ASTNODE_SIG, "setSourceRange", "void", "int", "int"))
+ .request(StackRequest.THIS)
+ .request(StackRequest.PARAM1)
+ .request(StackRequest.PARAM2)
+ .decisionMethod(new Hook(PATCH_DEBUG, "setSourceRangeCheck", "boolean", "java.lang.Object", "int", "int"))
+ .build());
+ }
+
private static void patchExtensionMethod(ScriptManager sm, boolean ecj) {
final String PATCH_EXTENSIONMETHOD = "lombok.eclipse.agent.PatchExtensionMethod";
final String PATCH_EXTENSIONMETHOD_COMPLETIONPROPOSAL_PORTAL = "lombok.eclipse.agent.PatchExtensionMethodCompletionProposalPortal";