aboutsummaryrefslogtreecommitdiff
path: root/src/lombok/eclipse/EclipseASTVisitor.java
AgeCommit message (Collapse)Author
2009-10-18Configured warnings and solved some.unknown
2009-10-16Fixed issue #24 by refactoring the AST.Node class - taken it out, and in the ↵Reinier Zwitserloot
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_.
2009-09-23Massive change to the eclipse handlers: They now set the 'generatedBy' flag ↵Reinier Zwitserloot
which we can use to patch eclipse in specific places to ignore generated nodes.
2009-07-11Made 'printContent=true' work for types as well as method bodies/initializers.Reinier Zwitserloot
2009-07-08Renamed all true names of 'eclipse' to 'Eclipse' (but not the eclipse ↵Reinier Zwitserloot
package, of course), and fixed a showstopper bug in the installer that would add -javaagent:lombok.jar to eclipse.ini, which is wrong of course; it needs to be lombok.eclipse.agent.jar.
2009-07-06Fixed javadoc problems, and added a javadoc target to the build script.Reinier Zwitserloot
2009-07-06Last massive documentation dump. All basic javadoc is now done, though ↵Reinier Zwitserloot
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!)
2009-06-28Preparating for java 1.5-ification. All stuff that isn't specific to javac ↵Reinier Zwitserloot
should run in java 1.5, so that an eclipse started on a 1.5 JVM will still run lombok.
2009-06-27[IMPROVEMENT]Reinier Zwitserloot
Eclipse will now also hold off on running @PrintAST handlers until the very end. Simple generators such as @Getter didn't need this, because PrintAST's handler will hold off until eclipse does a full parse, but when changing the innards of methods, you would likely not see what you did. Fixed that. Also, PrintAST has an option to, instead of diving into the ASTNodes of bodies (methods, initializers, etc), to just render the java code, to see if the AST creation/rewriting you've been doing looks like the java code you intended.
2009-06-21trivialReinier Zwitserloot
2009-06-21Due to a java bug, constants in enums don't work, so instead the default ↵Reinier Zwitserloot
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.
2009-06-18Expanded the AST printers to support a target PrintStream, and expanded the ↵Reinier Zwitserloot
@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).
2009-06-17Made the printing of Statements for @PrintAST slightly more useful (if a lot ↵Reinier Zwitserloot
more verbose), and bumped the version number in honour of quite a bit of redesign these past few commits.
2009-06-17Massive refactors. This list isn't complete, but should give you an idea:Reinier Zwitserloot
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.
2009-06-15Switched the level of the Node object you get during a visitAnnotationOnX ↵Reinier Zwitserloot
call from the Field/Type/Method/Local to the Annotation, so that you can interact with its handled flag.
2009-06-15Added annotations as definitive children of nodes in our custom AST, and ↵Reinier Zwitserloot
updated the visitor to call a separate visitAnnotationOnX method for annotated stuff. This way, 'handled' can be set per annotation. Also fixed a bug in AST generation that caused StackOverflowErrors on most source files, and did some cosmetic renaming of parameters.
2009-06-15all eclipse AST Statements objects are now part of the custom AST we build ↵Reinier Zwitserloot
for lombok. This way something like @AutoClose on a local var declaration can walk up one node, find all mentions of the variable, and add a close call right after the last mention.
2009-06-12Singularly massive code change, too hard to document. Basically, hooking now ↵Reinier Zwitserloot
occurs in the two most sane places: - After the parser is done building a first rendition of the AST. (Usually lightweight and missing method bodies etc) - After the parser is done taking such a lightweight AST and filling in the gaps. Lombok then builts its own bidirectional and somewhat saner AST out of this, and hands this saner AST off for treatment. Things in the AST can be marked as 'handled'. This seems to work swimmingly and should allow us to easily identify the annotations that are for us, and work our magic, no matter where they appear or on what, including stuff inside method bodies.