mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 08:18:29 +00:00
@FieldDefaults was causing template suggestions to not appear sometimes.
See issue 411.
This commit is contained in:
1 parent
70256754c2
commit
9bc421ecdc
1 file changed
+9
-1
@@ -69,7 +69,15 @@ public class HandleFieldDefaults extends EclipseAnnotationHandler<FieldDefaults>
|
||||
FieldDeclaration fieldDecl = (FieldDeclaration) field.get();
|
||||
if (!filterField(fieldDecl, false)) continue;
|
||||
|
||||
setFieldDefaultsForField(field, pos.get(), level, makeFinal);
|
||||
Class<?> t = field.get().getClass();
|
||||
if (t == FieldDeclaration.class) {
|
||||
// There are various other things that extend FieldDeclaration that really
|
||||
// aren't field declarations. Typing 'ma' in an otherwise blank class is a
|
||||
// CompletionOnFieldType object (extends FieldDeclaration). If we mess with the
|
||||
// modifiers of such a thing, you take away template suggestions such as
|
||||
// 'main method'. See issue 411.
|
||||
setFieldDefaultsForField(field, pos.get(), level, makeFinal);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user