diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2021-02-07 12:01:34 +0100 |
---|---|---|
committer | Rawi01 <Rawi01@users.noreply.github.com> | 2021-02-07 12:01:34 +0100 |
commit | a62ffaa280acd09892755897c1c97f5d06f02be5 (patch) | |
tree | 38a20fcfda2eb52e2401f9961cdb587cda470c40 /src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | |
parent | ed4ced1a3bc694f9a9903b5a15b2641236ff2f92 (diff) | |
download | lombok-a62ffaa280acd09892755897c1c97f5d06f02be5.tar.gz lombok-a62ffaa280acd09892755897c1c97f5d06f02be5.tar.bz2 lombok-a62ffaa280acd09892755897c1c97f5d06f02be5.zip |
Move eclipse only code for Delegate into own class
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 488d6eee..893e49c5 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2020 The Project Lombok Authors. + * Copyright (C) 2009-2021 The Project Lombok Authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -697,13 +697,13 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { .decisionMethod(new Hook("lombok.launch.PatchFixesHider$Delegate", "handleDelegateForType", "boolean", "java.lang.Object")) .build()); - sm.addScript(ScriptBuilder.setSymbolDuringMethodCall() + sm.addScriptIfWitness(OSGI_TYPES, 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() + sm.addScriptIfWitness(OSGI_TYPES, ScriptBuilder.addField() .fieldName("$delegateMethods") .fieldType("Ljava/util/Map;") .setPublic() @@ -711,10 +711,10 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { .targetClass("org.eclipse.jdt.internal.core.CompilationUnit") .build()); - sm.addScript(ScriptBuilder.wrapReturnValue() + sm.addScriptIfWitness(OSGI_TYPES, 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")) + .wrapMethod(new Hook("lombok.launch.PatchFixesHider$Delegate", "addGeneratedDelegateMethods", "java.lang.Object[]", "java.lang.Object", "java.lang.Object")) .build()); } |