diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-09-18 02:30:42 +0200 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2020-09-18 02:30:42 +0200 |
commit | f43a63b1d988a703dddbc61c47076d616bb3d639 (patch) | |
tree | 16ce7a33b9c93c9e8085e2fcc68e8d2295a79477 /src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | |
parent | 730670f1f4f41f41f23da6df59c06c40f717139a (diff) | |
parent | 8f14ac772282df3ef9f2ebe834d5c5a98c9eece8 (diff) | |
download | lombok-f43a63b1d988a703dddbc61c47076d616bb3d639.tar.gz lombok-f43a63b1d988a703dddbc61c47076d616bb3d639.tar.bz2 lombok-f43a63b1d988a703dddbc61c47076d616bb3d639.zip |
Merge branch 'delegate-methods-outline' of git://github.com/Rawi01/lombok into Rawi01-delegate-methods-outline
# Conflicts:
# src/core/lombok/eclipse/EclipseAugments.java
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index d0769e83..1c7de88b 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -711,6 +711,26 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { .request(StackRequest.THIS) .decisionMethod(new Hook("lombok.launch.PatchFixesHider$Delegate", "handleDelegateForType", "boolean", "java.lang.Object")) .build()); + + sm.addScript(ScriptBuilder.setSymbolDuringMethodCall() + .target(new MethodTarget("org.eclipse.jdt.internal.core.SelectionRequestor", "acceptSourceMethod")) + .callToWrap(new Hook("org.eclipse.jdt.core.IType", "getMethods", "org.eclipse.jdt.core.IMethod[]")) + .symbol("lombok.skipdelegates") + .build()); + + sm.addScript(ScriptBuilder.addField() + .fieldName("$delegateMethods") + .fieldType("Ljava/util/Map;") + .setPublic() + .setTransient() + .targetClass("org.eclipse.jdt.internal.core.CompilationUnit") + .build()); + + sm.addScript(ScriptBuilder.wrapReturnValue() + .target(new MethodTarget("org.eclipse.jdt.internal.core.SourceTypeElementInfo", "getChildren", "org.eclipse.jdt.core.IJavaElement[]")) + .request(StackRequest.RETURN_VALUE, StackRequest.THIS) + .wrapMethod(new Hook("lombok.launch.PatchFixesHider$Delegate", "getChildren", "java.lang.Object[]", "java.lang.Object", "java.lang.Object")) + .build()); } private static void addPatchesForValEclipse(ScriptManager sm) { |