Age | Commit message (Collapse) | Author |
|
|
|
on the lombok sources.
|
|
lombok.eclipe.handlers and javac.eclipse.handlers public. Renamed them to more useful names, made all methods public, added some javadoc, and renamed one or two methods to be more consistent.
Talked about in google groups thread http://groups.google.com/group/project-lombok/browse_thread/thread/52085a345e77c086
|
|
|
|
process fixed a lot of type annoyance by adding more generics.
Also changed coding style from for/while/if/switch/catch/do ( expr ) {} to for (expr) {}, hence the changes _everywhere_.
|
|
which we can use to patch eclipse in specific places to ignore generated nodes.
|
|
in combination with @Data). Addresses issue #37.
|
|
annotation @NotNull/@NonNull/@Nullable that is copied over by @Getter should no longer be causing the David Lynch bug.
|
|
|
|
|
|
the parameter
@Getter will copy them to the getter method
Added @NonNull to lombok to support null-checks in the setter
|
|
|
|
|
|
If boolean fields already start with a typical getter prefix (is, has, or get), lombok's @Getter will no longer generate its own prefix as well, so a field named 'hasFoo' will result in a getter named 'hasFoo()', not 'isHasFoo()'.
Also, if any likely getter name already exists for a boolean, a getter will not be generated. Thus, if your field is called 'hasFoo', and you already have a method named 'isFoo', then @Getter will not generate anything (and warn, unless the getter is being generated due to @Data).
This last mechanism works by taking the field name *AND* any other likely base names (defined by the field name being named as prefix+baseName, with prefix being is/has/get), and then prefixing all the likely fieldnames with is/has/get, and checking if any method with that name exists.
Of course, this means weird things are going to happen if you have 2 fields named 'isFoo' and 'hasFoo', but then, you'd be a real idiot if you did that.
|
|
generating it" warnings
when the getter/setter already there was in fact generated by lombok, and fixed a bug
in eclipse where a boolean array's getter method would be called isFoo() instead of getFoo().
|
|
upon anymore when reporting errors.
They were logging 4 or more identical warnings per problem before this change.
|
|
especially the docs
on the lombok annotations in the lombok package need far more massaging.
Also added a feature to HandleSynchronized to not auto-generate the locker fields if
a specific name is provided (because, imagine you typoed those. You'd never find it!)
|
|
should run in java 1.5, so that an eclipse started on a 1.5 JVM will still run lombok.
|
|
|
|
directly to other nodes (e.g. from a FieldDeclaration's type to a method argument) is NOT a good idea, as this screws up when
the TypeReference object represents a generic type (like 'T') - each instance of a generic type has a different resolution, but 1 TypeReference object can only hold 1 resolution.
Thus, a copyType() method has been written, and the Handle* classes have been updated to use it.
Also, generateEquals() is half-finished in HandleData.
|
|
** DO NOT REUSE TYPEREFERENCE OBJECTS **
because that makes the binding process go pearshaped - after hte first run, that TypeReference object's binding parameter is set, and as its set, the resolver won't bother re-resolving it.
However, each parse run starts with new scope objects, and any 2 bindings created by different scopes aren't equal to each other. urrrrrrgh!
Fortunately, a lot of code that 'fixed' methods by adding bindings and scope have all been removed, as the parser patch point is well before these bindings are created. Thus:
** NEVER CREATE YOUR OWN BINDINGS AND SCOPE OBJECTS **
because if it comes down to that, you're doing it entirely wrong. That's eclipse's job. We're patching where we are so you don't have to do this.
|
|
access level for @Getter and @Setter have now just been hardcoded in GetterHandler and SetterHandler.
Added ability to look up the Node object for any given AST object on Node itself, as you don't usually have the AST object.
Added toString() method generating to @Data, and this required some fancy footwork in finding if we've already generated methods, and editing a generated method to fill in binding and type resolutions. HandleGetter and HandleSetter have been updated to use these features.
Exceptions caused by lombok handlers show up in the eclipse error log, but now, if they are related to a CompilationUnit, also as a problem (error) on the CUD - those error log entries are easy to miss!
Our ASTs can now be appended to. When you generate a new AST node, you should add it to the AST, obviously. Getter/Setter have been updated to use this.
|
|
and setters only,
not yet a constructor, toString, hashCode, or equals.
HandleGetter and HandleSetter have been updated to handle static (theoretic; you can't put annotations on static fields normally).
You can now make AnnotationValue objects using just an annotationNode and a target type, as well as check if a given annotationNode is likely to represent a target annotation type. This is in Javac and Eclipse classes.
HandleGetter and HandleSetter can now be asked to make a getter/setter, and will grab access level off of a Getter/Setter annotation, if present.
|
|
HandleGetter a little mostly to stuff common code into PKG.
|
|
the annotation or not (previously, the presumption was they always handled the annotation).
This is very useful for PrintAST on eclipse, because before this change, you'd never see method contents (as the initial dietParse would come first). Now Eclipse PrintASTHandler
will skip any non-full runs, and only print non-diet. It then returns true only if it printed.
|
|
|