diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2009-12-30 00:02:43 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2009-12-30 00:02:43 +0100 |
commit | f3574ee0cb96a61a15f368bf82e55cc4ac313030 (patch) | |
tree | 6b30f860c96a61c3de45c66636eeaac7441e5114 /src | |
parent | f737c1ca2700d54b594ddf13519aa6af9f1362f1 (diff) | |
parent | 64e8eb8e46e8ec164cad221460b753898a429828 (diff) | |
download | lombok-f3574ee0cb96a61a15f368bf82e55cc4ac313030.tar.gz lombok-f3574ee0cb96a61a15f368bf82e55cc4ac313030.tar.bz2 lombok-f3574ee0cb96a61a15f368bf82e55cc4ac313030.zip |
Merge branch 'master' into ecj
Diffstat (limited to 'src')
-rw-r--r-- | src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java index e6d700f8..51f5ab4c 100644 --- a/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java +++ b/src/core/lombok/eclipse/handlers/EclipseHandlerUtil.java @@ -44,6 +44,7 @@ import org.eclipse.jdt.internal.compiler.ast.Expression; import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration; import org.eclipse.jdt.internal.compiler.ast.IfStatement; import org.eclipse.jdt.internal.compiler.ast.MarkerAnnotation; +import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration; import org.eclipse.jdt.internal.compiler.ast.NullLiteral; import org.eclipse.jdt.internal.compiler.ast.OperatorIds; import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference; @@ -160,13 +161,15 @@ public class EclipseHandlerUtil { if (node != null && node.get() instanceof TypeDeclaration) { TypeDeclaration typeDecl = (TypeDeclaration)node.get(); if (typeDecl.methods != null) for (AbstractMethodDeclaration def : typeDecl.methods) { - char[] mName = def.selector; - if (mName == null) continue; - boolean nameEquals = caseSensitive ? methodName.equals(new String(mName)) : methodName.equalsIgnoreCase(new String(mName)); - if (nameEquals) { - EclipseNode existing = node.getNodeFor(def); - if (existing == null || !existing.isHandled()) return MemberExistsResult.EXISTS_BY_USER; - return MemberExistsResult.EXISTS_BY_LOMBOK; + if (def instanceof MethodDeclaration) { + char[] mName = def.selector; + if (mName == null) continue; + boolean nameEquals = caseSensitive ? methodName.equals(new String(mName)) : methodName.equalsIgnoreCase(new String(mName)); + if (nameEquals) { + EclipseNode existing = node.getNodeFor(def); + if (existing == null || !existing.isHandled()) return MemberExistsResult.EXISTS_BY_USER; + return MemberExistsResult.EXISTS_BY_LOMBOK; + } } } } |