blob: 75b58b76c5f9bfa2da369b4f2e716d95da644ab2 [file] [log] [blame] [view]
Danny van Bruggen7a3b9602017-04-02 21:39:40 +02001Version 3.2.0
2------------------
3The lexical preservation code is stable!
4
5Beta: `TreeStructureVisitor`.
6
7* 885 884 879 878 smaller improvements and fixes
8
Danny van Bruggencadeeb52017-03-26 20:40:56 +02009Version 3.1.4
10------------------
11This is the first version to parse Java 9.
12
13Beta: `TreeStructureVisitor`, and `LexicalPreservingPrinter`.
14
15* 872 873 874 787 Remaining Java 9 work.
16
Danny van Bruggen64dd2802017-03-19 13:52:35 +010017Version 3.1.3
18------------------
19Beta: `TreeStructureVisitor`, and `LexicalPreservingPrinter`.
20
21A start has been made on source level support. The default level is Java 8.
22It can be set to Java 9 like this for a parser *instance*:
23```java
24private final JavaParser parser = new JavaParser(new ParserConfiguration().setValidator(new Java9Validator()));
25```
26and like this for the static parse methods:
27```java
28JavaParser.getStaticConfiguration().setValidator(new Java9Validator());
29```
30
31* 862 552 "_" is an illegal identifier on source level 9.
32* 869 867 109 855 857 smaller improvements and fixes
33
Danny van Bruggen79776b72017-03-11 15:07:40 +010034Version 3.1.2
35------------------
36Beta: `TreeStructureVisitor`, `ConcreteSyntaxModel`, and `LexicalPreservingPrinter`.
37
38* 594 849 831 a validation framework was introduced to inform about problems in the AST without needing to change the grammar,
39and without requiring parsing code.
40It is open for extension by users.
41* 852 853 826 832 846 839 smaller improvements and fixes
42
Danny van Bruggenf50a5512017-03-04 18:14:46 +010043Version 3.1.1
44------------------
45Beta: `TreeStructureVisitor`, `ConcreteSyntaxModel`, and `LexicalPreservingPrinter`.
46
47* 654 124 lexical preservation (printing source code with the same formatting it had when parsing) has been added.
48 Thank you @ftomassetti for a lot of work!
49* 554 800 first (big) step towards Java 9 support: JavaParser can read project Jigsaw module definitions.
50* 795 786 751 extend the TreeVisitor with more traversal options. Thanks @ryan-beckett!
51* 791 `GenericListVisitorAdapter` has been added which collects its results in a list. Thanks @Gottox!
52* 815 798 797 813 clean up Problem text
53* 819 818 817 816 441 809 808 807 fix various absurd annotation related issues.
54* 777 805 802 796 790 792 793 781 784 785 783 782 779 357 799 763 smaller improvements and fixes
55
Danny van Bruggen076d3ee2017-02-19 22:56:24 +010056Version 3.1.0
57------------------
Danny van Bruggenf50a5512017-03-04 18:14:46 +010058Beta: `TreeStructureVisitor` and `ConcreteSyntaxModel`.
Danny van Bruggen076d3ee2017-02-19 22:56:24 +010059
60* 705 755 Add the concrete syntax model, which will give you information about the exact syntax a certain nodes matches.
61
62* 777 smaller improvements and fixes
63
Danny van Bruggenadae33f2017-02-14 19:59:50 +010064Version 3.1.0-beta.2
65------------------
66This version is a beta because `TreeStructureVisitor` is not in its definite state yet.
67
68* 762 761 772 merge `javaparser-metamodel` and `javaparser-generator-utils` into `javaparser-core`.
69* 766 the `ModifierVisitor` is now created by a code generator. Its behaviour has been made logical, and may give different results than before.
70* 755 `ConstructorDeclaration` and `MethodDeclaration` now share a parent: `CallableDeclaration`
71* 687 759 773 769 768 767 765 759 smaller improvements and fixes
72
Danny van Bruggen23d54772017-02-05 16:21:16 +010073Version 3.1.0-beta.1
Danny van Bruggen70f343e2017-01-28 14:07:25 +010074------------------
Danny van Bruggen23d54772017-02-05 16:21:16 +010075This version is a beta because there are a lot of new features that may still change.
76
77This version needs a minor version increase because of a backwards compatability issue:
78* 719 `getJavadoc`, `getJavadocComment` and `getComment` could return null. Our promise was to return `Optional`, so that is what they do now.
Danny van Bruggen70f343e2017-01-28 14:07:25 +010079
80New:
Danny van Bruggene6079d82017-02-05 16:50:01 +010081* 658 718 736 737 we have created a metamodel.
Danny van Bruggen23d54772017-02-05 16:21:16 +010082It gives information about the structure of the various AST nodes, as if you are introspecting them.
83You can find it in `javaparser-metamodel`, the main class is `JavaParserMetaModel`
Danny van Bruggene6079d82017-02-05 16:50:01 +010084* 353 365 visitors are no longer hand made, they are now generated from the metamodel. This should make them 100% reliable.
Danny van Bruggen23d54772017-02-05 16:21:16 +010085Affected visitors are: `GenericVisitorAdapter`, `EqualsVisitor`, `VoidVisitorAdapter`, `VoidVisitor`, `GenericVisitor`, `HashCodeVisitor`, `CloneVisitor`.
86
87If you want to generate your own visitors, you can use the `VisitorGenerator` class from `javaparser-core-generators`
88
89If you want to reuse the code generation utilities, look at module `javaparser-generator-utils` - there is a very useful `SourceRoot` class in there that takes away a lot of file management troubles.
Danny van Bruggene6079d82017-02-05 16:50:01 +010090* 538 735 `TreeStructureVisitor` has been added, which should be considered beta.
91* 220 733 717 749 745 750 743 748 666 732 746 734 733 smaller improvements and fixes
Danny van Bruggen70f343e2017-01-28 14:07:25 +010092
Danny van Bruggenc5f6e9b2017-01-15 20:58:52 +010093Version 3.0.1
94------------------
95* 699 433 325 Javadoc can now be parsed
96* 703 696 added NodeWithOptionalScope
97* 702 FieldAccessExpr now implements NodeWithSimpleName, *which means that "field" has been renamed to "name"*
98* 707 706 improve range of array types and levels
99* 709 smaller improvements and fixes
100
Danny van Bruggen1804ea22017-01-07 23:06:22 +0100101Version 3.0.0
102------------------
103* 695 697 689 680 693 691 682 690 677 679 688 684 683 smaller improvements and fixes
104
Danny van Bruggene11ed222016-12-24 22:25:49 +0100105Version 3.0.0-RC.4
106------------------
107* 668 669 TypeDeclarationStmt became LocalClassDeclarationStmt
108* 347 665 every node now has some documentation
109* 660 670 673 four types of import declaration have been merged back into the old ImportDeclaration
110* 659 The pretty printer can now take customized visitors
111* 650 671 672 674 524 smaller improvements and fixes
112
Danny van Bruggenfc9c4a92016-12-18 23:13:10 +0100113Version 3.0.0-RC.3
114------------------
115* 639 622 632 657 656 652 653 647 648 645 194 643 630 624 628 627 626 625 623 cleanups, small fixes, and general housekeeping
116
Danny van Bruggendd5d4d02016-12-09 16:40:59 +0100117Version 3.0.0-RC.2
118------------------
119* 593 EmptyImportDeclaration and NonEmptyImportDeclaration have been removed
120* 612 VariableDeclaratorId has been removed. It has been substituted by "SimpleName name"
121* 614 617 the list of tokens has been linearized and simplified
122* 615 support for arrays has once more been changed. See [the issue](https://github.com/javaparser/javaparser/issues/592)
123* 580 453 380 618 580 611 610 424 608 smaller improvements and fixes
124
Danny van Bruggen61aaeaf2016-12-01 18:37:11 +0100125Version 3.0.0-RC.1
126------------------
127* 499 601 renames many fields to be more consistent
128* 596 605 602 604 smaller improvements and fixes
129
Danny van Bruggen47379542016-11-27 16:54:33 +0100130Version 3.0.0-alpha.11
131------------------
132* 547 595 Node.range is now using Optional instead of Range.UNKNOWN
Danny van Bruggen6738e1c2016-11-28 19:46:45 +0100133* 584 588 548 585 bug fixes and improvements
Danny van Bruggen47379542016-11-27 16:54:33 +0100134
matozoidf52d1ad2016-11-20 16:36:22 +0100135Version 3.0.0-alpha.10
136------------------
137* 578 579 577 575 290 570 568 567 562 564 551 bug fixes and improvements
138
Danny van Bruggen02b3c5e2016-11-10 10:33:44 +0100139Version 3.0.0-alpha.9
140------------------
141* 403 358 549 Make all names nodes: either SimpleName or Name. This makes every name in the AST visitable. NameExpr is now a wrapper to use SimpleName in an expression.
matozoidd2c9f432016-11-13 17:29:38 +0100142* 516 536 use Optional<> for return values.
matozoid789ddfe2016-11-13 17:33:43 +0100143* 556 557 558 550 small improvements and fixes.
144* 560 559 make nodes observable.
Danny van Bruggen02b3c5e2016-11-10 10:33:44 +0100145
matozoidaa79a622016-11-06 14:13:37 +0100146Version 3.0.0-alpha.8
147------------------
148* 344 529 turn DumpVisitor into an official PrettyPrinter
149* 532 508 427 530 531 513 528 cleanups
150
matozoidde10e892016-10-26 19:48:54 +0200151Version 3.0.0-alpha.7
152------------------
matozoid57a10942016-10-30 21:14:28 +0100153* 515 roll back attempt at using Optional
154* 522 504 make NodeList not a Node (restores parent/children behaviour to before alpha.4)
155* 527 526 rename getChildrenNodes to getChildNodes
156* 525 495 520 bug fix
matozoidde10e892016-10-26 19:48:54 +0200157
158Version 3.0.0-alpha.6
159------------------
160* 503 modified ImportDeclaration hierarchy to have getters for static and "asterisk" again
161* 506 bug fix
162
matozoid9ac80482016-10-16 22:08:51 +0200163Version 3.0.0-alpha.5
164------------------
165* 451 null is no longer allowed in the AST. [See last post in issue](https://github.com/javaparser/javaparser/issues/451)
166* 501 421 420 316 use a special type of list for nodes: NodeList. [See last post in issue](https://github.com/javaparser/javaparser/issues/421)
167
matozoid93c5ac12016-10-09 22:03:29 +0200168Version 3.0.0-alpha.4
169------------------
170* 463 471 nodes can now be removed easily
171* 491 import handling changed. Instead of "ImportDeclaration", we now have the four types of import as described in the JLS. [See issue](https://github.com/javaparser/javaparser/pull/491)
172* 452 355 474 494 various improvements
173* 493 492 485 Simplify the JavaParser interface
174
matozoid6ea2c522016-09-30 18:55:44 +0200175Version 3.0.0-alpha.3
176------------------
matozoid93c5ac12016-10-09 22:03:29 +0200177* 112 237 466 465 461 460 458 457 fundamentally changes how we deal with arrays. [It is explained in the last post here](https://github.com/javaparser/javaparser/issues/237)
matozoid6ea2c522016-09-30 18:55:44 +0200178* 472 456 makes the "data" field on every node more structured.
179* 477 468 refactor TypeArguments. You will find that TypeArguments is no longer a type, it is just a list in some nodes.
180* 482 adds the "nodeTypes" packages to the osgi export.
181* 479 476 makes all setters on nodes return this so they become chainable.
182* 473 437 clean up CloneVisitor.
matozoid53d288a2016-07-18 13:32:44 +0200183
matozoid6ea2c522016-09-30 18:55:44 +0200184Version 3.0.0-alpha.2
185------------------
186* 157 a new parser frontend, check https://github.com/javaparser/javaparser/pull/447 for explanations
187* 435 more builder methods like 400 and 405
188* 111 440 443 444 445 446 bugs & cleanups
matozoid53d288a2016-07-18 13:32:44 +0200189
matozoid6ea2c522016-09-30 18:55:44 +0200190Version 3.0.0-alpha.1
191------------------
192* 400 405 introduce many "builder" style methods for constructing code. Thanks DeepSnowNeeL!
193* 409 remove ASTHelper (methods are now on specific Node subclasses)
194* 414 JavaParser can now be instantiated and reused. InstanceJavaParser removed
195* 418 417 411 408 bugs
196* 367 420 407 402 various cleanups
197
198Version 2.5.1
matozoid53d288a2016-07-18 13:32:44 +0200199-------------
matozoid6ea2c522016-09-30 18:55:44 +0200200* 394 OSGi manifest added
201* 391 fix ModifierVisitor NullPointerException bug
202* 385 a few new parse methods
203* 386 fix dumping an empty import (a single ; after the package declaration)
matozoid53d288a2016-07-18 13:32:44 +0200204
205Version 2.5.0
206-------------
207API breaking changes:
208
209* 191: moved TreeVisitor to visitor package
210* 368, 162, 303, 302, 360: use correct type in some places.
211* 371: code is now compiled with Java 8
212* 342, 331: ModifierVisitorAdapter detects and removes broken nodes
213* 328, 270: upgrade JavaCC (use TokenMgrException now)
214Other changes:
215
216* 297: enable access to tokens.
217* 341, 361: node positions are now OO
218* 211, 373: escaping of \n \r for string literals
219* 336, 276, 141: JavaDoc support now works
220* 337, 281: reorganize the stream reading code
221* 343, 309, 332, 57: take advantage of common interfaces
222* 329, 326, 327: deal with platform issues
223* 163, 236, 252, 296, 269, 339, 321, 322, 252, 253, 293, 295: various fixes
224* 310, 311, 313, 301, 294: some code clean-ups
Danny van Bruggen5f5c6cc2016-07-20 13:40:30 +0200225
matozoid6ea2c522016-09-30 18:55:44 +0200226Version 2.4.0
Danny van Bruggen5f5c6cc2016-07-20 13:40:30 +0200227-------------
matozoid6ea2c522016-09-30 18:55:44 +0200228* several fixes in DumpVisitor for bugs due to lazy initialization
229* make TypeDeclaration implements DocumentableNode directly
230* TypedNode interface introduced
231* introduce MultiBoundType
232* refactored IntersectionType and UnionType
233* refactored CatchClause
234* parsing annotations in throws declarations
235* parse orphan semicolons in import statements
236* added PackageDeclaration.getPackageName
237* solved issue with newlines in string literals
238* fixed handling of UnknownType in EqualsVisitor
239* improvements to CommentsParser
240* removing old grammar
matozoid13818472016-08-23 22:03:06 +0200241
matozoid6ea2c522016-09-30 18:55:44 +0200242Version 2.3.0
243-------------
244* ClassOrInterfaceType implements NamedNode
245* DumpVisitor can now be extended
246* Improved documentation
247* AST: lists are now lazy initialized
matozoid8669cf42016-09-30 18:39:12 +0200248
Danny van Bruggen27b32072017-02-19 23:27:37 +0100249Version 2.1.0
matozoideae61572016-09-30 18:57:34 +0200250-------------
251* Features
252 * [#75 performance improvement for `PositionUtils.sortByBeginPosition`](https://github.com/javaparser/javaparser/issues/75)
253 * [#64 In getDeclarationAsString parameter names should be optional](https://github.com/javaparser/javaparser/issues/64)
254* Bugfixes
255 * [#79 Fix NPE in `ConstructorDeclaration.getDeclarationAsString`](https://github.com/javaparser/javaparser/pull/79)
256 * [#86 Add missing functions to ModifierVisitorAdapter](https://github.com/javaparser/javaparser/pull/86)
257 * [#82 set LambdaExpr as parent of its child nodes](https://github.com/javaparser/javaparser/issues/82)
258 * [#87 implement `setJavadoc` and `getJavadoc` at various classes](https://github.com/javaparser/javaparser/issues/87)
259 * [#96 Fixed encoding issue in `Javaparser.parse`](https://github.com/javaparser/javaparser/pull/96)
260 * [#85 Casting a lambda expression causes a parsing failure](https://github.com/javaparser/javaparser/issues/85)
261 * [#88 `MethodReferenceExpr` and `TypeExpr` don't set themselves as parents](https://github.com/javaparser/javaparser/issues/88)
262* Internal
263 * [#89 CommentsParser.State contains unused fields](https://github.com/javaparser/javaparser/issues/89)
264 * Switched from drone.io to [Travis](https://travis-ci.org/javaparser/javaparser)
265 * [#105 Enforce compiling the library for a certain Java version](https://github.com/javaparser/javaparser/pull/105)
266
267[Code changes](https://github.com/javaparser/javaparser/compare/javaparser-parent-2.0.0...master)
268
269Version 2.0.0
270-------------
271* support Java 8
Danny van Bruggen27b32072017-02-19 23:27:37 +0100272
273Version 1.0.8 (2010-01-17)
274-------------
275* Fixed issues:
276 * Issue 17: A refactor suggestion for AnnotationExpr and its subclasses
277 * Issue 21: Java 5 JavaParser compiled JARs
278 * Issue 22: Please use java.lang.reflect.Modifier constants in japa.parser.ast.body.ModifierSet
279 * Issue 27: Implement the "equal" method
280 * Issue 30: equals and hashCode methods
281
282Version 1.0.7 (2009-04-12)
283-------------
284* Issue 19 fixed:
285* Tests changed to run with junit 4
286
287Version 1.0.6 (2009-01-11)
288-------------
289* Issue 11 fixed: changed method get/setPakage to get/setPackage in the class CompilationUnit
290* Created new visitor adapter to help AST modification: ModifierVisitorAdapter
291* Changed visitor adapters to abstract
292
293Version 1.0.5 (2008-10-26)
294-------------
295* Created simplified constructors in the nodes of the AST (without positional arguments)
296* Created ASTHelper class with some helpful methods (more methods are still needed)
297
298Version 1.0.4 (2008-10-07)
299-------------
300* Moved to javacc 4.1.
301* The java_1_5.jj can be build alone without compilation errors
302
303Version 1.0.3 (2008-09-06)
304-------------
305* Removed SuperMemberAccessExpr class, it was no longer used
306* Removed the methods get/setTypeArgs() from ArrayCreationExpr, this node shouldn't have these methods.
307* Fixed the bug with start/end position of the nodes IntegerLiteralMinValueExpr and LongLiteralMinValueExpr
308* The methods get/setAnnotations() from all BodyDeclaration subclasses were pushed down to BodyDeclaration class
309
310Version 1.0.2 (2008-07-20)
311-------------
312* Issue fixed: Issue 1: Add support for editing AST nodes or create new ones
313
314Version 1.0.1 (2008-07-01)
315-------------
316* Issue fixed: Issue 5: end line and end column equal to begin line and begin column
317
318Version 1.0.0 (2008-06-25)
319-------------
320* Changed version numbering, starting version 1.0.0
321* Javadoc done for packages:
322 * japa.parser
323 * japa.parser.ast
324* Corrected bug when parsing in multithread:
325 * JavaParser.setCacheParser(false) must be called before to use the parser concurrent
326
3272008-06-19
328-------------
329* No code changes, added binary distribution to download page
330
3312008-06-11
332-------------
333* Bug corrected: NPE in VoidVisitorAdapter
334 * http://code.google.com/p/javaparser/issues/detail?id=2
335
3362008-06-09
337-------------
338* Added Adapters for de visitors
339
3402008-05-28
341-------------
342* This project now is published at Google Code:
343 * http://code.google.com/p/javaparser/
344
3452008-05-25
346-------------
347* Added support for comments and javadoc to the tree.
348 * Javadocs are stored directly to members (BodyDeclaration and all deriveds (classes, methods, fields, etc.)), accessible by the method getJavadoc().
349 * All comments are stored in the CompilationUnit, accessible by the method getComments().
350
3512008-04-01
352-------------
353* Changed all nodes public attributes to be private and created getters to access them
354* Changed the methods of the Node getLine e getColumn to getBeginLine and getBeginColumn
355* Added the methods getEndLine and getEndColumn to the Node class (works only in the BlockNode)
356
3572007-12-22
358-------------
359* Corrected ConditionalExpression bug
360
3612007-10-21
362-------------
363* Added LGPL License
364
3652007-10-21
366-------------
367* Bugs corrected:
368 * Created PackageDeclaration member of CompilationUnit to add suport for annotations in the package declaration
369 * Parameterized anonymous constructor invocation
370 * Explicit constructor invotation Type Arguments
371 * ctrl+z ("\u001A") ar end of compilation unit
372
3732007-10-09
374-------------
375* EnumConstantDeclaration annotation support corrected
376* Parssing Java Unicode escape characters suport added
377
3782007-10-03
379-------------
380* Bug corrected: "MotifComboPopup.this.super()" statement was generating parser error
381
3822007-10-01
383-------------
384* Bug corrected: Casting signed primitive values
385```
386 double d = (double) -1;
387 ^
388```
3892007-08-06
390-------------
391* Bug with the single line comments in the final of the unit corrected
392
3932007-07-31
394-------------
395* Fixed the bug with the following expression: `Class c = (int.class);`
396
3972007-06-26
398-------------
399* Bug fixes from Leon Poyyayil work
400 * suport for hex floating point
401 * unicode digits in indentifier
402 * MemberValueArrayInitializer
403
4042007-03-09
405-------------
406* Long and Integer literal MIN_VALUE bug
407
4082007-02-24
409-------------
410* '\0' bug fixed
411
4122007-02-01
413-------------
414* Many bug fixes
415* Added line/column to nodes