diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-01-09 21:24:07 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2012-01-09 21:25:47 +0100 |
commit | 101adef99c670cd05951a1ef66c1530b4234c1ca (patch) | |
tree | 360ab04e04106f417aebadaf9c8dabf04745cf00 /src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | |
parent | d332b22fa9e2da502d3230c2f44191d42cf90522 (diff) | |
download | lombok-101adef99c670cd05951a1ef66c1530b4234c1ca.tar.gz lombok-101adef99c670cd05951a1ef66c1530b4234c1ca.tar.bz2 lombok-101adef99c670cd05951a1ef66c1530b4234c1ca.zip |
Lombok now adds a line about itself to the Eclipse about dialog via patching. This can be used to check that lombok is managing to successfully inject code into the eclipse VM instance.
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java index a1825074..8103806b 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java +++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java @@ -32,7 +32,9 @@ import java.util.Stack; 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; @@ -48,6 +50,14 @@ 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)) { + return origReturnValue + "\n\nLombok " + Version.getFullVersion() + " is installed. http://projectlombok.org/"; + } + + return origReturnValue; + } + public static boolean isGenerated(org.eclipse.jdt.core.dom.ASTNode node) { boolean result = false; try { @@ -67,7 +77,7 @@ public class PatchFixes { public static boolean returnFalse(java.lang.Object object) { return false; } - + @java.lang.SuppressWarnings({"unchecked", "rawtypes"}) public static java.util.List removeGeneratedNodes(java.util.List list) { try { java.util.List realNodes = new java.util.ArrayList(list.size()); |