diff options
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index b8f9f9a3..ce494daa 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -45,20 +45,25 @@ import lombok.patcher.scripts.ScriptBuilder; public class EclipsePatcher extends Agent { @Override public void runAgent(String agentArgs, Instrumentation instrumentation, boolean injected) throws Exception { - registerPatchScripts(instrumentation, injected); + registerPatchScripts(instrumentation, injected, injected); } - private static void registerPatchScripts(Instrumentation instrumentation, boolean reloadExistingClasses) { + private static void registerPatchScripts(Instrumentation instrumentation, boolean reloadExistingClasses, boolean ecjOnly) { ScriptManager sm = new ScriptManager(); sm.registerTransformer(instrumentation); - EquinoxClassLoader.addPrefix("lombok."); - EquinoxClassLoader.registerScripts(sm); + if (!ecjOnly) { + EquinoxClassLoader.addPrefix("lombok."); + EquinoxClassLoader.registerScripts(sm); + } -// patchLombokizeAST(sm); patchAvoidReparsingGeneratedCode(sm); -// patchCatchReparse(sm); -// patchSetGeneratedFlag(sm); -// patchHideGeneratedNodes(sm); + + if (!ecjOnly) { + patchLombokizeAST(sm); + patchCatchReparse(sm); + patchSetGeneratedFlag(sm); + patchHideGeneratedNodes(sm); + } if (reloadExistingClasses) sm.reloadClasses(instrumentation); } |