From 2ddf708b37f32e5c618927dd3e7dc8ac0e2e18d4 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Mon, 9 Jan 2012 21:45:43 +0100 Subject: The line about lombok added to the about dialog wasn't working for all eclipse releases and ways to boot up eclipse. Now it does. Also added an item for this in the changelog. --- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 4 ++-- src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 220aa9e2..a721b468 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -158,8 +158,8 @@ public class EclipsePatcher extends Agent { */ sm.addScript(ScriptBuilder.wrapReturnValue() .target(new MethodTarget("org.eclipse.core.internal.runtime.Product", "getProperty", "java.lang.String", "java.lang.String")) - .wrapMethod(new Hook("lombok.eclipse.agent.PatchFixes", "addLombokNotesToEclipseAboutDialog", "java.lang.String", "java.lang.String", "org.eclipse.core.internal.runtime.Product", "java.lang.String")) - .request(StackRequest.RETURN_VALUE, StackRequest.THIS, StackRequest.PARAM1) + .wrapMethod(new Hook("lombok.eclipse.agent.PatchFixes", "addLombokNotesToEclipseAboutDialog", "java.lang.String", "java.lang.String", "java.lang.String")) + .request(StackRequest.RETURN_VALUE, StackRequest.PARAM1) .transplant().build()); } diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index 8103806b..53d60bde 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -34,7 +34,6 @@ import lombok.core.DiagnosticsReceiver; import lombok.core.PostCompiler; import lombok.core.Version; -import org.eclipse.core.internal.runtime.Product; import org.eclipse.core.runtime.CoreException; import org.eclipse.jdt.core.IAnnotatable; import org.eclipse.jdt.core.IAnnotation; @@ -50,8 +49,8 @@ import org.eclipse.jdt.internal.core.dom.rewrite.TokenScanner; import org.eclipse.jdt.internal.corext.refactoring.structure.ASTNodeSearchUtil; public class PatchFixes { - public static String addLombokNotesToEclipseAboutDialog(String origReturnValue, Product product, String key) { - if ("Eclipse SDK".equals(product.getName()) && "aboutText".equals(key)) { + public static String addLombokNotesToEclipseAboutDialog(String origReturnValue, String key) { + if ("aboutText".equals(key)) { return origReturnValue + "\n\nLombok " + Version.getFullVersion() + " is installed. http://projectlombok.org/"; } -- cgit