diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2009-12-29 23:55:36 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2009-12-29 23:55:36 +0100 |
commit | f737c1ca2700d54b594ddf13519aa6af9f1362f1 (patch) | |
tree | 06d2c48368e10afaa4cd9ca5195749df50eb61f3 /src | |
parent | 0917f20f74728ab311160252e06b5368d6ab4a55 (diff) | |
download | lombok-f737c1ca2700d54b594ddf13519aa6af9f1362f1.tar.gz lombok-f737c1ca2700d54b594ddf13519aa6af9f1362f1.tar.bz2 lombok-f737c1ca2700d54b594ddf13519aa6af9f1362f1.zip |
EclipsePatcher now only patches needed stuff when in ECJ mode.
Diffstat (limited to 'src')
-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); } |