aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2023-03-20 21:46:25 +0100
committerRoel Spilker <r.spilker@gmail.com>2023-03-22 22:57:52 +0100
commitafceb138e6e4ca2dca0f16fd5297d7451f5f4e80 (patch)
treeea8d5ddd944809b92f9a9ed857da90c00b521ac7 /src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
parentd56b576c26d6e6a0621997a9758151cf41e7a74e (diff)
downloadlombok-afceb138e6e4ca2dca0f16fd5297d7451f5f4e80.tar.gz
lombok-afceb138e6e4ca2dca0f16fd5297d7451f5f4e80.tar.bz2
lombok-afceb138e6e4ca2dca0f16fd5297d7451f5f4e80.zip
[fixes #3373] Find references for extension methods
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
index c0bfbe09..aa548af0 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
@@ -918,6 +918,13 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable {
.request(StackRequest.THIS)
.wrapMethod(new Hook(PATCH_EXTENSIONMETHOD_COMPLETIONPROPOSAL_PORTAL, "getJavaCompletionProposals", I_JAVA_COMPLETION_PROPOSAL_SIG, "java.lang.Object[]", "java.lang.Object"))
.build());
+
+ sm.addScriptIfWitness(OSGI_TYPES, ScriptBuilder.wrapReturnValue()
+ .target(new MethodTarget("org.eclipse.jdt.core.search.SearchPattern", "createPattern", "org.eclipse.jdt.core.search.SearchPattern", "org.eclipse.jdt.core.IJavaElement", "int", "int"))
+ .wrapMethod(new Hook(PATCH_EXTENSIONMETHOD, "modifyMethodPattern", "java.lang.Object", "java.lang.Object"))
+ .cast()
+ .request(StackRequest.RETURN_VALUE)
+ .build());
}
private static void patchNullCheck(ScriptManager sm) {