mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 04:16:19 +00:00
Merge branch 'master' into ecj
This commit is contained in:
commit
f3574ee0cb
3 files changed
+19
-7
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
class GetFoo {
|
||||
private int foo;
|
||||
public int getFoo() {
|
||||
return foo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class GetFoo {
|
||||
@lombok.Getter private int foo;
|
||||
}
|
||||
Reference in new issue
Block a user