Age | Commit message (Collapse) | Author |
|
|
|
throw eclipse errors if you had 0 non-static fields.
|
|
deepToString, and added @Override in case people have warnings for missing @Override annotations on.
|
|
|
|
|
|
without any raw generics warnings - it is effectively done.
|
|
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.
|
|
missing a 0!
|
|
implementation details in there. If switching primes is so important, hash the type name and turn that into a prime, or something.
Also added some javadoc.
|
|
static constructor not so much.
|
|
|
|
that processor.
|
|
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.
|
|
|
|
|
|
its clearly eclipse-specific.
|
|
agent though I never tested it. I found a bug while browsing this code. fixed it.
|
|
parser, but also the CompilationUnitDeclaration class so we can store our AST in it for caching purposes.
|
|
|
|
HandleGetter a little mostly to stuff common code into PKG.
|
|
@PrintAST annotation to let you supply an optional filename. Useful particularly for IDEs, which don't usually have a viewable console.
Also renamed the printers to just 'Printer', as they are already inner classes of a specifically named type (JavacASTVisitor & co).
|
|
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.
|
|
If they exist (with any returntype/paramlist), no getter/setter is generated, and instead a warning is added on the annotation.
|
|
on a JavacAST.Node, because you need it to e.g. access constant types like 'void'.
|
|
more verbose), and bumped the version number in honour of quite a bit of redesign these past few commits.
|
|
XASTPrinters in each ASTVisitor interface.
|
|
|
|
printing the raw (instead of resolved) types for fields etc, because usually they aren't resolved yet.
|
|
you can start your traversal at any point, not just from the top.
Also a bugfix for endVisitStatement which passed the wrong node, and method arguments in Javac are no longer misfiled as local declarations.
|
|
neccessary to have the lombok.jar in the deployment path of whatever you write WITH lombok, which is a good idea.
Though - rewriting to e.g. a Lombok.sneakyThrow() call would require lombok.jar anyway. We'll cross that bridge when we get there.
|
|
|
|
|
|
|
|
off. The only issue is that the count by javac is being misreported (it doesn't count lombok errors).
|
|
something crucial to properly make javac generate the line + the ^^^^ indicators.
|
|
array of Statements contains inner arrays that are null. Fixed that.
|
|
mechanism to generate generic errors and warnings for javac.
|
|
thing.
|
|
method argument or not (by instanceof checking if it's an Argument) is faulty, as e.g. the argument to a catch block is also an Argument object. Rewritten the visitChild method to be based on a switch on the Node's getKind(), just like JavacAST. This even looks nicer.
|
|
A) many things in lombok.eclipse moved to lombok.core to enable reuse with lombok.javac.
B) lombok.javac works now similarly to eclipse's model: We first make big ASTs that are bidirectionally traversable, then we walk through that for annotations.
C) Instead of getting an annotation instance, you now get an object that is more flexible and can e.g. give you class values in an enum as a string instead of a Class object, which may fail if that class isn't on the classpath of lombok.
D) sources to the internal sun classes for javac added to /contrib.
|
|
same on every round.
|
|
|
|
to be implemented:
1. The visit mode of a lombok handler (does not trigger off of annotations, instead sees every field, method, type, and statement), needs to be coded,
2. triggering off of annotations via APT's annotation handling system skips method-local classes. We'll need to recode this via an AST visitor like we need for issue #1
Other than that, triggering off of annotations works swimmingly!
|
|
|
|
|
|
annotation, and not the field/type/local/method it goes with, all the way, so that you can easily generate a warning on an annotation in a handler.
|
|
call from the Field/Type/Method/Local to the Annotation, so that you can interact with its handled flag.
|