diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2023-03-20 21:46:25 +0100 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2023-03-22 22:57:52 +0100 |
commit | afceb138e6e4ca2dca0f16fd5297d7451f5f4e80 (patch) | |
tree | ea8d5ddd944809b92f9a9ed857da90c00b521ac7 /src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | |
parent | d56b576c26d6e6a0621997a9758151cf41e7a74e (diff) | |
download | lombok-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.java | 7 |
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) { |