diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2020-07-20 10:44:04 +0200 |
---|---|---|
committer | Rawi01 <Rawi01@users.noreply.github.com> | 2020-08-16 18:35:28 +0200 |
commit | 8f14ac772282df3ef9f2ebe834d5c5a98c9eece8 (patch) | |
tree | 1583b77de027d951e4df19fa915e7c562c0237e9 /src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | |
parent | 7dfbe4323c15cbd88983380b27a250d2a381d148 (diff) | |
download | lombok-8f14ac772282df3ef9f2ebe834d5c5a98c9eece8.tar.gz lombok-8f14ac772282df3ef9f2ebe834d5c5a98c9eece8.tar.bz2 lombok-8f14ac772282df3ef9f2ebe834d5c5a98c9eece8.zip |
Add generated delegate methods to eclipse outline
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 c560f002..2a7a6d51 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -655,6 +655,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) { |