aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-04-05 04:20:59 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-04-05 04:20:59 +0200
commiteb3c98a6750a4ff7c23f23c10bdb5d2d8afcc6c6 (patch)
tree6caaf2f7ddb30f9218ea8beadcef589099e2954f
parente45b492bb007af43301799f2e338a509a6389888 (diff)
downloadlombok-eb3c98a6750a4ff7c23f23c10bdb5d2d8afcc6c6.tar.gz
lombok-eb3c98a6750a4ff7c23f23c10bdb5d2d8afcc6c6.tar.bz2
lombok-eb3c98a6750a4ff7c23f23c10bdb5d2d8afcc6c6.zip
fixed the ‘cleanup/codeformat on save’ save cleanup action in Eclipse Mars.
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
index 9906c4d4..28e8d0c1 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
@@ -312,6 +312,13 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable {
.callToWrap(new Hook("org.eclipse.jdt.internal.corext.util.CodeFormatterUtil", "reformat", "org.eclipse.text.edits.TextEdit",
"int", "java.lang.String", "int", "int", "int", "java.lang.String", "java.util.Map"))
.symbol("lombok.disable").build());
+
+ sm.addScript(ScriptBuilder.setSymbolDuringMethodCall()
+ .target(new MethodTarget("org.eclipse.jdt.internal.corext.fix.CodeFormatFix", "createCleanUp", "org.eclipse.jdt.ui.cleanup.ICleanUpFix",
+ "org.eclipse.jdt.core.ICompilationUnit", "org.eclipse.jface.text.IRegion[]", "boolean", "boolean", "boolean", "boolean"))
+ .callToWrap(new Hook("org.eclipse.jdt.internal.corext.util.CodeFormatterUtil", "reformat", "org.eclipse.text.edits.TextEdit",
+ "int", "java.lang.String", "int", "java.lang.String", "java.util.Map"))
+ .symbol("lombok.disable").build());
}
private static void patchRefactorScripts(ScriptManager sm) {