Commit Graph

  • b4cab3f65c [IMPROVEMENT] Reinier Zwitserloot 2009-06-27 04:00:12 +02:00
  • b9714eae8c [BUGFIX] Pretty major bug - due to a typo, ALL values for annotation methods were set to the value of the last annotation method. e.g in: Reinier Zwitserloot 2009-06-27 03:57:51 +02:00
  • c4611d669d [BUGFIX] For some reason, JCLiteral objects contain '1' or '0' (integers) for booleans, not actual booleans. You can tell the difference via the getKind() method. hence, boolean fields in annotations were throwing unexpected type errors (Integer instead of Boolean). Fixed this. Reinier Zwitserloot 2009-06-27 03:56:33 +02:00
  • 18931bec53 [TRIVIAL] Added a toString to AnnotationValue, used to debug something, but useful enough to leave in there. Reinier Zwitserloot 2009-06-27 03:52:31 +02:00
  • 4bddd821d2 Whoops - there was some debug printing left in eclipse's HandleGetter Reinier Zwitserloot 2009-06-27 03:10:43 +02:00
  • 157bbba3ac Added a caching mechanism to AnnotationValues, for instantiating the annotation. Reinier Zwitserloot 2009-06-27 03:10:04 +02:00
  • 47bd3e3c06 Added some bugs that we need to fix. Reinier Zwitserloot 2009-06-26 05:34:55 +02:00
  • cea4c9bb04 Cleanup implemented for eclipse! Reinier Zwitserloot 2009-06-26 04:56:40 +02:00
  • 91cd698b1e Added a readme. Reinier Zwitserloot 2009-06-25 06:29:21 +02:00
  • 84e40cd4e3 Bumped version from 0.3.0 to 0.3.5 in celebration of finishing all 3 generating annotations for both javac and eclipse (@Getter, @Setter, and @Data). Reinier Zwitserloot 2009-06-25 06:20:51 +02:00
  • 76135a9fb7 Added support for generating toString to javac's HandleData. Now javac's HandleData is COMPLETE! w00t! Reinier Zwitserloot 2009-06-25 06:18:44 +02:00
  • 29c610af18 Added generating hashCode() to javac's HandleData. Reinier Zwitserloot 2009-06-25 06:05:11 +02:00
  • 9d7e12d96c trivial Reinier Zwitserloot 2009-06-25 06:05:07 +02:00
  • 19fec30bc1 javac's HandleData now makes equals methods. Reinier Zwitserloot 2009-06-25 05:34:01 +02:00
  • dec4be3738 Removed adding the statement: 'final int PRIME = 31;' in the HandleData's createHashCode method when there are 0 fields in the type (it would generate a local variable never used warning!) Reinier Zwitserloot 2009-06-25 05:33:04 +02:00
  • 63894b98dd Heh, on errors you'd never actually see any message, just the exception type. Whoops. Reinier Zwitserloot 2009-06-25 05:24:42 +02:00
  • bcee5a50db javac's HandleData now generates the constructor only if it doesn't already exist, and the staticConstructor is now also completed. Left: toString, hashCode, equals. Reinier Zwitserloot 2009-06-24 07:01:52 +02:00
  • 6d42559417 Work on HandleData, as well as generalizing features in the the PKG class and updating HandleGetter/Setter to call into it. Reinier Zwitserloot 2009-06-24 01:23:10 +02:00
  • c346b5c054 Added printing for a constructor if it is the default (generated) constructor or not. Reinier Zwitserloot 2009-06-24 01:22:53 +02:00
  • 99a38d4d08 Added proper support for changing the AST as its being visited, both removal and addition. The rule is now: children traversal traverses through the tree mostly as it was when it started. Reinier Zwitserloot 2009-06-24 01:22:08 +02:00
  • c834e09af4 Useful script while developing on the javac part of lombok. Reinier Zwitserloot 2009-06-24 01:21:21 +02:00
  • 7191aa78bd fixed a bug where the auto-generated constructors (actual or static) would throw eclipse errors if you had 0 non-static fields. Reinier Zwitserloot 2009-06-23 23:52:34 +02:00
  • 2ebb040c81 HandleData for eclipse now seems to work 100%. Also updated toString to use deepToString, and added @Override in case people have warnings for missing @Override annotations on. Reinier Zwitserloot 2009-06-23 23:29:11 +02:00
  • 6210df32d0 @Data's generation of the equals() method now works! Reinier Zwitserloot 2009-06-23 21:58:04 +02:00
  • d27fd01b2b Doc Reinier Zwitserloot 2009-06-23 20:20:07 +02:00
  • e85ef24b4d Fixed some bugs in copyType(), and now the static constructor is generated without any raw generics warnings - it is effectively done. Reinier Zwitserloot 2009-06-23 19:13:03 +02:00
  • 8bbdcec6fa Figured out that our previous act of just assigning TypeReference objects 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. Reinier Zwitserloot 2009-06-23 08:04:44 +02:00
  • 6c82a3c780 This is a 3-day bughunt that ended up being something extremely simple: Reinier Zwitserloot 2009-06-23 06:01:13 +02:00
  • 4ee8e7a3d2 Put the actual numeric value of ASTNode.Bit24 in a comment, but it was missing a 0! Reinier Zwitserloot 2009-06-23 06:00:57 +02:00
  • 794801c3c9 Removed the equalsPrime thing, because that's just needlessly putting implementation details in there. If switching primes is so important, hash the type name and turn that into a prime, or something. Reinier Zwitserloot 2009-06-23 05:56:00 +02:00
  • fdde039d23 More work on the HandleData annotation. Constructor seems to work fine, static constructor not so much. Reinier Zwitserloot 2009-06-21 18:17:03 +02:00
  • a27c48dd5c trivial Reinier Zwitserloot 2009-06-21 18:16:55 +02:00
  • b8d9c9ed97 Bug fix: using string literals in any lombok annotation value would blow up that processor. Reinier Zwitserloot 2009-06-21 18:16:18 +02:00
  • 255bd59071 Due to a java bug, constants in enums don't work, so instead the default access level for @Getter and @Setter have now just been hardcoded in GetterHandler and SetterHandler. Reinier Zwitserloot 2009-06-20 23:46:17 +02:00
  • 2e8e43a12e Runs eclipse on a mac. Reinier Zwitserloot 2009-06-20 23:29:47 +02:00
  • ff306fa5d9 Added initial support for the @Data annotation. Currently produces getters and setters only, not yet a constructor, toString, hashCode, or equals. Reinier Zwitserloot 2009-06-19 16:24:10 +02:00
  • e56ab6c245 Added info on the addNetbeans branch. Reinier Zwitserloot 2009-06-19 04:48:23 +02:00
  • b964ec18fc Finding lombok.jar would fail if you had any spaces in the path. Fixed that. Reinier Zwitserloot 2009-06-19 04:32:47 +02:00
  • 7f7cdfc3fc Moved ClassLoaderWorkaround from 'java.lombok' to 'java.lombok.eclipse' as its clearly eclipse-specific. Reinier Zwitserloot 2009-06-19 03:42:15 +02:00
  • 8b6b821918 Live reloading of the eclipse parser classes is technically supported by the agent though I never tested it. I found a bug while browsing this code. fixed it. Reinier Zwitserloot 2009-06-19 03:27:56 +02:00
  • 00452d0e95 Renamed EclipseParserPatcher to EclipsePatcher, as it patches not just the parser, but also the CompilationUnitDeclaration class so we can store our AST in it for caching purposes. Reinier Zwitserloot 2009-06-19 03:24:44 +02:00
  • 7bbf7789f8 List of stuff we still need to do as well as research notes on how to get there. Reinier Zwitserloot 2009-06-19 03:24:17 +02:00
  • 0bb66dd93d Created a fully working HandleSetter for eclipse, and refactored HandleGetter a little mostly to stuff common code into PKG. Reinier Zwitserloot 2009-06-18 01:37:06 +02:00
  • 6254337948 Expanded the AST printers to support a target PrintStream, and expanded the @PrintAST annotation to let you supply an optional filename. Useful particularly for IDEs, which don't usually have a viewable console. Reinier Zwitserloot 2009-06-18 01:17:03 +02:00
  • eca3cd7ccc AnnotationHandlers can now return a boolean to set if they actually handled the annotation or not (previously, the presumption was they always handled the annotation). Reinier Zwitserloot 2009-06-17 21:57:54 +02:00
  • 8fa5005444 Added 'does setX/getX already exist' check to javac's HandleGetter/Setter. If they exist (with any returntype/paramlist), no getter/setter is generated, and instead a warning is added on the annotation. Reinier Zwitserloot 2009-06-17 21:35:51 +02:00
  • 1929a28c9d Added the SetterHandler for javac. Also added a way to get the SymbolTable on a JavacAST.Node, because you need it to e.g. access constant types like 'void'. Reinier Zwitserloot 2009-06-17 21:27:27 +02:00
  • 7c65e0fdff Made the printing of Statements for @PrintAST slightly more useful (if a lot more verbose), and bumped the version number in honour of quite a bit of redesign these past few commits. Reinier Zwitserloot 2009-06-17 20:59:15 +02:00
  • 8aae52a992 A useful annotation that prints the AST of any annotated element via the XASTPrinters in each ASTVisitor interface. Reinier Zwitserloot 2009-06-17 20:54:54 +02:00
  • 5bdfa539f2 Just renamed some parameters to more sensical names. Reinier Zwitserloot 2009-06-17 20:54:25 +02:00
  • 981e7db354 A bugfix to the visitMethodArgument method, and printing improved by printing the raw (instead of resolved) types for fields etc, because usually they aren't resolved yet. Reinier Zwitserloot 2009-06-17 20:53:29 +02:00
  • 57a5786734 Moved the traverse() from Eclipse/JavacAST to Eclipse/JavacAST.Node, so that you can start your traversal at any point, not just from the top. Reinier Zwitserloot 2009-06-17 20:52:36 +02:00
  • 1d85326769 No retention at all seems much smarter, because then it wouldn't be neccessary to have the lombok.jar in the deployment path of whatever you write WITH lombok, which is a good idea. Reinier Zwitserloot 2009-06-17 20:51:12 +02:00
  • e737d64242 Renamed the Handler implementations. Reinier Zwitserloot 2009-06-17 20:12:03 +02:00
  • db2326714f Trivial Reinier Zwitserloot 2009-06-17 20:09:01 +02:00
  • d3ee75020e Removed a debug print. Reinier Zwitserloot 2009-06-17 20:08:49 +02:00
  • af27ad5395 Error reporting now works 99% properly - the right position is being marked off. The only issue is that the count by javac is being misreported (it doesn't count lombok errors). Reinier Zwitserloot 2009-06-17 20:05:19 +02:00
  • 0c9897303f Warnings and errors on specific positions works, sort of. Still missing something crucial to properly make javac generate the line + the ^^^^ indicators. Reinier Zwitserloot 2009-06-17 20:01:43 +02:00
  • ccf0e5da41 NullPointerExceptions were showing up in Eclipse, when a 2+ dimensional array of Statements contains inner arrays that are null. Fixed that. Reinier Zwitserloot 2009-06-17 19:53:21 +02:00
  • acbd2308b5 Added reading in (via spi) JavacASTVisitors and calling them, as well as a mechanism to generate generic errors and warnings for javac. Reinier Zwitserloot 2009-06-17 19:33:12 +02:00
  • 1a2392f8b3 None of the methods in this class were even being used, so deleted the whole thing. Reinier Zwitserloot 2009-06-17 19:32:36 +02:00
  • 4ab2bb7be0 Turns out using instanceof checks to figure out if a LocalDeclaration is a 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. Reinier Zwitserloot 2009-06-17 19:23:05 +02:00
  • 024d8ffa98 Massive refactors. This list isn't complete, but should give you an idea: Reinier Zwitserloot 2009-06-17 10:43:39 +02:00
  • aa6d2e262f Moved the generation of the Trees object to init(), as it seems to be the same on every round. Reinier Zwitserloot 2009-06-16 13:58:28 +02:00
  • d289910196 Removed debug prints. Reinier Zwitserloot 2009-06-16 13:57:56 +02:00
  • f36be2eb01 Implemented a lot of stuff for javac, but we ran into 2 major issues still 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 Reinier Zwitserloot 2009-06-16 03:04:46 +02:00
  • d78a04d748 See diff Reinier Zwitserloot 2009-06-16 00:25:59 +02:00
  • bb4e1db759 Added ability to add visitor handlers. Reinier Zwitserloot 2009-06-16 00:11:09 +02:00
  • 1216239116 Propagated the fact that you get the Node object belonging to the 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. Reinier Zwitserloot 2009-06-15 23:58:52 +02:00
  • 92ab0e7971 Switched the level of the Node object you get during a visitAnnotationOnX call from the Field/Type/Method/Local to the Annotation, so that you can interact with its handled flag. Reinier Zwitserloot 2009-06-15 23:36:55 +02:00
  • c2fd0a1ef5 Added annotations as definitive children of nodes in our custom AST, and updated the visitor to call a separate visitAnnotationOnX method for annotated stuff. This way, 'handled' can be set per annotation. Reinier Zwitserloot 2009-06-15 23:30:01 +02:00
  • 12ff7ca223 trivial Reinier Zwitserloot 2009-06-15 23:25:53 +02:00
  • eebc3450e4 all eclipse AST Statements objects are now part of the custom AST we build 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. Reinier Zwitserloot 2009-06-15 22:32:44 +02:00
  • d2ffd52636 Fixed showstopper bugs we ran into when actually running with these changes. Related to 8353911b1d Reinier Zwitserloot 2009-06-15 22:32:19 +02:00
  • c4cd04b7d2 Just in case people run lombok.jar as a java app (e.g. by double-clicking it), open a browser window with info, and print some useful help to the console. Reinier Zwitserloot 2009-06-15 20:58:33 +02:00
  • d7e5537b9e Moved version.txt to lombok.core.Version.java. Reinier Zwitserloot 2009-06-15 20:46:04 +02:00
  • 293a4bfaf0 Renamed lombok.transformations lombok.core as the purpose of this package is to contain stuff that is useful for any lombok implementation (be it e.g. javac via apt or eclipse via agent), but not annotations and other classes that are for 'end users'. Reinier Zwitserloot 2009-06-15 20:31:25 +02:00
  • 842cefb75c Moved TypeResolver to the eclipse package, as it has eclipse-specific code in it. Reinier Zwitserloot 2009-06-15 20:28:25 +02:00
  • 8353911b1d Renamed lombok.agent.eclipse to lombok.eclipse.agent Reinier Zwitserloot 2009-06-15 20:26:44 +02:00
  • cd1ef24d0b Now you no longer need to add a -Xbootclasspath/a parameter to eclipse.ini; the agent fixes the classpath all by its lonesome. Wahey! Reinier Zwitserloot 2009-06-15 01:20:29 +02:00
  • 65de2407ae Made lombok more robust by catching exceptions near the top level and turning them into eclipse-wide errors in the worst case, but usually in an error in the problems dialog. Reinier Zwitserloot 2009-06-14 23:55:39 +02:00
  • 65cd03b6c5 Added support to generate errors, both on specific nodes in an AST (generified code in HandlerLibrary for unintelligible annotation param values), and more severe general errors for eclipse's error log. Reinier Zwitserloot 2009-06-14 23:40:10 +02:00
  • 012459832d the version number generator now strips the newline. It was generating files with newlines in it. Reinier Zwitserloot 2009-06-12 17:29:50 +02:00
  • 47d3db6b93 Error reporting now works - we can use the error reporting on decoding annotation arguments for other places! Reinier Zwitserloot 2009-06-12 17:26:51 +02:00
  • 343eb68043 Clinits should be skipped, as they are useless, and the docs even say they will be skipped. Reinier Zwitserloot 2009-06-12 17:09:04 +02:00
  • d1157b3b8a Whoops. Bugfix for enums. They get parsed correctly now! Reinier Zwitserloot 2009-06-12 16:57:40 +02:00
  • 6372983000 Now everything works; handlers are called via SPI, and annotations are being parsed. w00t! Reinier Zwitserloot 2009-06-12 09:54:24 +02:00
  • 40e35d6f79 After spending 3 hours chasing down a NullPointerException inside the native method that handles method.invoke... Reinier Zwitserloot 2009-06-12 08:38:24 +02:00
  • 7d24f9c9a5 Removed the WeakHashMap for caching EclipseAST objects; obviously wasn't working due to circular reference from the EclipseAST back to the CUD. Reinier Zwitserloot 2009-06-12 08:37:38 +02:00
  • 0ef6792608 For the strangest reason, compiling Getter with javac fails; it wants AccessLevel, but has AccessLevel. Yah, WTF. Turning AccessLevel into its FQN: lombok.AccessLevel fixes it. javac bug? Reinier Zwitserloot 2009-06-12 08:35:43 +02:00
  • d7434059c4 Found 2 bugs in spi. This fixes both of them. Also enabled the spi processor in eclipse project. Reinier Zwitserloot 2009-06-12 08:34:04 +02:00
  • 95c38be18c Added a link to how JavaFX bindings work. Reinier Zwitserloot 2009-06-12 08:32:27 +02:00
  • 4cac23952a There's nothing interesting in this file. Reinier Zwitserloot 2009-06-12 08:32:01 +02:00
  • 7e24174dcc Filled out the deps and lib system with separate dirs for the agent and lombok proper, and moved spi into lombok's lib path. Reinier Zwitserloot 2009-06-12 03:54:30 +02:00
  • 8517deb8be Moved HandleGetter to its own package. This package should soon see HandleSetter, HandleAutoClose, etc. Reinier Zwitserloot 2009-06-12 03:44:40 +02:00
  • 5dca3b7eea Incomplete work on pseudo-resolving something like "@Getter" to: Yes, this is almost certainly intended to be lombok.Getter, so get to work! Reinier Zwitserloot 2009-06-12 03:42:01 +02:00
  • e84bdd32e7 Singularly massive code change, too hard to document. Basically, hooking now occurs in the two most sane places: Reinier Zwitserloot 2009-06-12 03:40:07 +02:00
  • 4c18c774fc We were tracking ideas for annotations on the window, but writing on those gets old fast, so moved it to a text file. Reinier Zwitserloot 2009-06-12 03:38:54 +02:00
  • 1f7c79e625 Added more good ideas. Reinier Zwitserloot 2009-06-10 15:28:32 +02:00
  • 466fc44671 Build system splits the jars in two. Reinier Zwitserloot 2009-06-09 20:55:58 +02:00