blob: f55d88e0fba13ea4adcf65f155c9b150b7389c77 [file] [log] [blame] [view]
Danny van Bruggenc7f87802017-06-11 15:57:27 +02001Version 3.2.7
2------------------
3[issues resolved](https://github.com/javaparser/javaparser/milestone/47?closed=1)
4* We now recover from some parse errors! [Here is an article](https://matozoid.github.io/2017/06/11/parse-error-recovery.html)
5
Danny van Bruggen9250ffa2017-06-04 20:50:37 +02006Version 3.2.6
7------------------
8[issues resolved](https://github.com/javaparser/javaparser/milestone/46?closed=1)
9* `EmptyMemberDeclaration` is gone!
10It was deprecated for a while because it it was in the AST, but doesn't have any meaning in a Java program.
11`EmptyStmt` was also deprecated, but that has been reverted.
12This node *does* have meaning.
13
Danny van Bruggenee5691c2017-05-22 19:47:13 +020014Version 3.2.5
15------------------
16[issues resolved](https://github.com/javaparser/javaparser/milestone/45?closed=1)
17* `NodeWithCondition` was added on all nodes containing a condition.
18* Lots of work on improving lexical preservation.
19* If a file was parsed from a file system, you can now get path information etc. from `CompilationUnit`
20* API BREAKING: every node now points to its start and end token.
21Some of the API has started returning `TokenRange` instead of `Range` - you can call `toRange` to get the old object type.
22We may still change the naming of some of this code in the following month.
23
Danny van Bruggen5201adc2017-05-14 14:00:56 +020024Version 3.2.4
25------------------
26New style changelog, no more issue numbers, but a link:
27[issues resolved](https://github.com/javaparser/javaparser/milestone/44?closed=1)
28and any notable changes:
29* the new method `Node.removeForced()` by removing it, or removing the first parent that is optional.
30This is different from `Node.remove()`, `remove()` only tries to remove the node from the parent and fails if it can't.
31* `FieldAccessExpr.scope` is now a required property.
32You might find some `get()`s in your code that are no longer necessary.
33* `ReferenceType` no longer has a type parameter, so every `ReferenceType<?>` can be replaced by `ReferenceType` now.
34
Danny van Bruggen9c513212017-04-30 22:15:44 +020035Version 3.2.3
36------------------
37* 907 906 905 903 911 910 909 908 smaller improvements and fixes
38
Danny van Bruggendc8077a2017-04-23 12:04:03 +020039Version 3.2.2
40------------------
41Beta: `TreeStructureVisitor`.
42
43* 770 902 904 901 smaller improvements and fixes
44
Danny van Bruggen28cf0be2017-04-16 15:05:10 +020045Version 3.2.1
46------------------
47Beta: `TreeStructureVisitor`.
48
49* Maven dependencies were updated to their latest versions
50* 890 the concept of "method signature" now exists in JavaParser
51* 896 891 889 887 882 789 smaller improvements and fixes
52
Danny van Bruggen7a3b9602017-04-02 21:39:40 +020053Version 3.2.0
54------------------
55The lexical preservation code is stable!
56
57Beta: `TreeStructureVisitor`.
58
59* 885 884 879 878 smaller improvements and fixes
60
Danny van Bruggencadeeb52017-03-26 20:40:56 +020061Version 3.1.4
62------------------
63This is the first version to parse Java 9.
64
65Beta: `TreeStructureVisitor`, and `LexicalPreservingPrinter`.
66
67* 872 873 874 787 Remaining Java 9 work.
68
Danny van Bruggen64dd2802017-03-19 13:52:35 +010069Version 3.1.3
70------------------
71Beta: `TreeStructureVisitor`, and `LexicalPreservingPrinter`.
72
73A start has been made on source level support. The default level is Java 8.
74It can be set to Java 9 like this for a parser *instance*:
75```java
76private final JavaParser parser = new JavaParser(new ParserConfiguration().setValidator(new Java9Validator()));
77```
78and like this for the static parse methods:
79```java
80JavaParser.getStaticConfiguration().setValidator(new Java9Validator());
81```
82
83* 862 552 "_" is an illegal identifier on source level 9.
84* 869 867 109 855 857 smaller improvements and fixes
85
Danny van Bruggen79776b72017-03-11 15:07:40 +010086Version 3.1.2
87------------------
88Beta: `TreeStructureVisitor`, `ConcreteSyntaxModel`, and `LexicalPreservingPrinter`.
89
90* 594 849 831 a validation framework was introduced to inform about problems in the AST without needing to change the grammar,
91and without requiring parsing code.
92It is open for extension by users.
93* 852 853 826 832 846 839 smaller improvements and fixes
94
Danny van Bruggenf50a5512017-03-04 18:14:46 +010095Version 3.1.1
96------------------
97Beta: `TreeStructureVisitor`, `ConcreteSyntaxModel`, and `LexicalPreservingPrinter`.
98
99* 654 124 lexical preservation (printing source code with the same formatting it had when parsing) has been added.
100 Thank you @ftomassetti for a lot of work!
101* 554 800 first (big) step towards Java 9 support: JavaParser can read project Jigsaw module definitions.
102* 795 786 751 extend the TreeVisitor with more traversal options. Thanks @ryan-beckett!
103* 791 `GenericListVisitorAdapter` has been added which collects its results in a list. Thanks @Gottox!
104* 815 798 797 813 clean up Problem text
105* 819 818 817 816 441 809 808 807 fix various absurd annotation related issues.
106* 777 805 802 796 790 792 793 781 784 785 783 782 779 357 799 763 smaller improvements and fixes
107
Danny van Bruggen076d3ee2017-02-19 22:56:24 +0100108Version 3.1.0
109------------------
Danny van Bruggenf50a5512017-03-04 18:14:46 +0100110Beta: `TreeStructureVisitor` and `ConcreteSyntaxModel`.
Danny van Bruggen076d3ee2017-02-19 22:56:24 +0100111
112* 705 755 Add the concrete syntax model, which will give you information about the exact syntax a certain nodes matches.
113
114* 777 smaller improvements and fixes
115
Danny van Bruggenadae33f2017-02-14 19:59:50 +0100116Version 3.1.0-beta.2
117------------------
118This version is a beta because `TreeStructureVisitor` is not in its definite state yet.
119
120* 762 761 772 merge `javaparser-metamodel` and `javaparser-generator-utils` into `javaparser-core`.
121* 766 the `ModifierVisitor` is now created by a code generator. Its behaviour has been made logical, and may give different results than before.
122* 755 `ConstructorDeclaration` and `MethodDeclaration` now share a parent: `CallableDeclaration`
123* 687 759 773 769 768 767 765 759 smaller improvements and fixes
124
Danny van Bruggen23d54772017-02-05 16:21:16 +0100125Version 3.1.0-beta.1
Danny van Bruggen70f343e2017-01-28 14:07:25 +0100126------------------
Danny van Bruggen23d54772017-02-05 16:21:16 +0100127This version is a beta because there are a lot of new features that may still change.
128
129This version needs a minor version increase because of a backwards compatability issue:
130* 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 +0100131
132New:
Danny van Bruggene6079d82017-02-05 16:50:01 +0100133* 658 718 736 737 we have created a metamodel.
Danny van Bruggen23d54772017-02-05 16:21:16 +0100134It gives information about the structure of the various AST nodes, as if you are introspecting them.
135You can find it in `javaparser-metamodel`, the main class is `JavaParserMetaModel`
Danny van Bruggene6079d82017-02-05 16:50:01 +0100136* 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 +0100137Affected visitors are: `GenericVisitorAdapter`, `EqualsVisitor`, `VoidVisitorAdapter`, `VoidVisitor`, `GenericVisitor`, `HashCodeVisitor`, `CloneVisitor`.
138
139If you want to generate your own visitors, you can use the `VisitorGenerator` class from `javaparser-core-generators`
140
141If 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 +0100142* 538 735 `TreeStructureVisitor` has been added, which should be considered beta.
143* 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 +0100144
Danny van Bruggenc5f6e9b2017-01-15 20:58:52 +0100145Version 3.0.1
146------------------
147* 699 433 325 Javadoc can now be parsed
148* 703 696 added NodeWithOptionalScope
149* 702 FieldAccessExpr now implements NodeWithSimpleName, *which means that "field" has been renamed to "name"*
150* 707 706 improve range of array types and levels
151* 709 smaller improvements and fixes
152
Danny van Bruggen1804ea22017-01-07 23:06:22 +0100153Version 3.0.0
154------------------
155* 695 697 689 680 693 691 682 690 677 679 688 684 683 smaller improvements and fixes
156
Danny van Bruggene11ed222016-12-24 22:25:49 +0100157Version 3.0.0-RC.4
158------------------
159* 668 669 TypeDeclarationStmt became LocalClassDeclarationStmt
160* 347 665 every node now has some documentation
161* 660 670 673 four types of import declaration have been merged back into the old ImportDeclaration
162* 659 The pretty printer can now take customized visitors
163* 650 671 672 674 524 smaller improvements and fixes
164
Danny van Bruggenfc9c4a92016-12-18 23:13:10 +0100165Version 3.0.0-RC.3
166------------------
167* 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
168
Danny van Bruggendd5d4d02016-12-09 16:40:59 +0100169Version 3.0.0-RC.2
170------------------
171* 593 EmptyImportDeclaration and NonEmptyImportDeclaration have been removed
172* 612 VariableDeclaratorId has been removed. It has been substituted by "SimpleName name"
173* 614 617 the list of tokens has been linearized and simplified
174* 615 support for arrays has once more been changed. See [the issue](https://github.com/javaparser/javaparser/issues/592)
175* 580 453 380 618 580 611 610 424 608 smaller improvements and fixes
176
Danny van Bruggen61aaeaf2016-12-01 18:37:11 +0100177Version 3.0.0-RC.1
178------------------
179* 499 601 renames many fields to be more consistent
180* 596 605 602 604 smaller improvements and fixes
181
Danny van Bruggen47379542016-11-27 16:54:33 +0100182Version 3.0.0-alpha.11
183------------------
184* 547 595 Node.range is now using Optional instead of Range.UNKNOWN
Danny van Bruggen6738e1c2016-11-28 19:46:45 +0100185* 584 588 548 585 bug fixes and improvements
Danny van Bruggen47379542016-11-27 16:54:33 +0100186
matozoidf52d1ad2016-11-20 16:36:22 +0100187Version 3.0.0-alpha.10
188------------------
189* 578 579 577 575 290 570 568 567 562 564 551 bug fixes and improvements
190
Danny van Bruggen02b3c5e2016-11-10 10:33:44 +0100191Version 3.0.0-alpha.9
192------------------
193* 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 +0100194* 516 536 use Optional<> for return values.
matozoid789ddfe2016-11-13 17:33:43 +0100195* 556 557 558 550 small improvements and fixes.
196* 560 559 make nodes observable.
Danny van Bruggen02b3c5e2016-11-10 10:33:44 +0100197
matozoidaa79a622016-11-06 14:13:37 +0100198Version 3.0.0-alpha.8
199------------------
200* 344 529 turn DumpVisitor into an official PrettyPrinter
201* 532 508 427 530 531 513 528 cleanups
202
matozoidde10e892016-10-26 19:48:54 +0200203Version 3.0.0-alpha.7
204------------------
matozoid57a10942016-10-30 21:14:28 +0100205* 515 roll back attempt at using Optional
206* 522 504 make NodeList not a Node (restores parent/children behaviour to before alpha.4)
207* 527 526 rename getChildrenNodes to getChildNodes
208* 525 495 520 bug fix
matozoidde10e892016-10-26 19:48:54 +0200209
210Version 3.0.0-alpha.6
211------------------
212* 503 modified ImportDeclaration hierarchy to have getters for static and "asterisk" again
213* 506 bug fix
214
matozoid9ac80482016-10-16 22:08:51 +0200215Version 3.0.0-alpha.5
216------------------
217* 451 null is no longer allowed in the AST. [See last post in issue](https://github.com/javaparser/javaparser/issues/451)
218* 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)
219
matozoid93c5ac12016-10-09 22:03:29 +0200220Version 3.0.0-alpha.4
221------------------
222* 463 471 nodes can now be removed easily
223* 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)
224* 452 355 474 494 various improvements
225* 493 492 485 Simplify the JavaParser interface
226
matozoid6ea2c522016-09-30 18:55:44 +0200227Version 3.0.0-alpha.3
228------------------
matozoid93c5ac12016-10-09 22:03:29 +0200229* 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 +0200230* 472 456 makes the "data" field on every node more structured.
231* 477 468 refactor TypeArguments. You will find that TypeArguments is no longer a type, it is just a list in some nodes.
232* 482 adds the "nodeTypes" packages to the osgi export.
233* 479 476 makes all setters on nodes return this so they become chainable.
234* 473 437 clean up CloneVisitor.
matozoid53d288a2016-07-18 13:32:44 +0200235
matozoid6ea2c522016-09-30 18:55:44 +0200236Version 3.0.0-alpha.2
237------------------
238* 157 a new parser frontend, check https://github.com/javaparser/javaparser/pull/447 for explanations
239* 435 more builder methods like 400 and 405
240* 111 440 443 444 445 446 bugs & cleanups
matozoid53d288a2016-07-18 13:32:44 +0200241
matozoid6ea2c522016-09-30 18:55:44 +0200242Version 3.0.0-alpha.1
243------------------
244* 400 405 introduce many "builder" style methods for constructing code. Thanks DeepSnowNeeL!
245* 409 remove ASTHelper (methods are now on specific Node subclasses)
246* 414 JavaParser can now be instantiated and reused. InstanceJavaParser removed
247* 418 417 411 408 bugs
248* 367 420 407 402 various cleanups
249
250Version 2.5.1
matozoid53d288a2016-07-18 13:32:44 +0200251-------------
matozoid6ea2c522016-09-30 18:55:44 +0200252* 394 OSGi manifest added
253* 391 fix ModifierVisitor NullPointerException bug
254* 385 a few new parse methods
255* 386 fix dumping an empty import (a single ; after the package declaration)
matozoid53d288a2016-07-18 13:32:44 +0200256
257Version 2.5.0
258-------------
259API breaking changes:
260
261* 191: moved TreeVisitor to visitor package
262* 368, 162, 303, 302, 360: use correct type in some places.
263* 371: code is now compiled with Java 8
264* 342, 331: ModifierVisitorAdapter detects and removes broken nodes
265* 328, 270: upgrade JavaCC (use TokenMgrException now)
266Other changes:
267
268* 297: enable access to tokens.
269* 341, 361: node positions are now OO
270* 211, 373: escaping of \n \r for string literals
271* 336, 276, 141: JavaDoc support now works
272* 337, 281: reorganize the stream reading code
273* 343, 309, 332, 57: take advantage of common interfaces
274* 329, 326, 327: deal with platform issues
275* 163, 236, 252, 296, 269, 339, 321, 322, 252, 253, 293, 295: various fixes
276* 310, 311, 313, 301, 294: some code clean-ups
Danny van Bruggen5f5c6cc2016-07-20 13:40:30 +0200277
matozoid6ea2c522016-09-30 18:55:44 +0200278Version 2.4.0
Danny van Bruggen5f5c6cc2016-07-20 13:40:30 +0200279-------------
matozoid6ea2c522016-09-30 18:55:44 +0200280* several fixes in DumpVisitor for bugs due to lazy initialization
281* make TypeDeclaration implements DocumentableNode directly
282* TypedNode interface introduced
283* introduce MultiBoundType
284* refactored IntersectionType and UnionType
285* refactored CatchClause
286* parsing annotations in throws declarations
287* parse orphan semicolons in import statements
288* added PackageDeclaration.getPackageName
289* solved issue with newlines in string literals
290* fixed handling of UnknownType in EqualsVisitor
291* improvements to CommentsParser
292* removing old grammar
matozoid13818472016-08-23 22:03:06 +0200293
matozoid6ea2c522016-09-30 18:55:44 +0200294Version 2.3.0
295-------------
296* ClassOrInterfaceType implements NamedNode
297* DumpVisitor can now be extended
298* Improved documentation
299* AST: lists are now lazy initialized
matozoid8669cf42016-09-30 18:39:12 +0200300
Danny van Bruggen27b32072017-02-19 23:27:37 +0100301Version 2.1.0
matozoideae61572016-09-30 18:57:34 +0200302-------------
303* Features
304 * [#75 performance improvement for `PositionUtils.sortByBeginPosition`](https://github.com/javaparser/javaparser/issues/75)
305 * [#64 In getDeclarationAsString parameter names should be optional](https://github.com/javaparser/javaparser/issues/64)
306* Bugfixes
307 * [#79 Fix NPE in `ConstructorDeclaration.getDeclarationAsString`](https://github.com/javaparser/javaparser/pull/79)
308 * [#86 Add missing functions to ModifierVisitorAdapter](https://github.com/javaparser/javaparser/pull/86)
309 * [#82 set LambdaExpr as parent of its child nodes](https://github.com/javaparser/javaparser/issues/82)
310 * [#87 implement `setJavadoc` and `getJavadoc` at various classes](https://github.com/javaparser/javaparser/issues/87)
311 * [#96 Fixed encoding issue in `Javaparser.parse`](https://github.com/javaparser/javaparser/pull/96)
312 * [#85 Casting a lambda expression causes a parsing failure](https://github.com/javaparser/javaparser/issues/85)
313 * [#88 `MethodReferenceExpr` and `TypeExpr` don't set themselves as parents](https://github.com/javaparser/javaparser/issues/88)
314* Internal
315 * [#89 CommentsParser.State contains unused fields](https://github.com/javaparser/javaparser/issues/89)
316 * Switched from drone.io to [Travis](https://travis-ci.org/javaparser/javaparser)
317 * [#105 Enforce compiling the library for a certain Java version](https://github.com/javaparser/javaparser/pull/105)
318
319[Code changes](https://github.com/javaparser/javaparser/compare/javaparser-parent-2.0.0...master)
320
321Version 2.0.0
322-------------
323* support Java 8
Danny van Bruggen27b32072017-02-19 23:27:37 +0100324
325Version 1.0.8 (2010-01-17)
326-------------
327* Fixed issues:
328 * Issue 17: A refactor suggestion for AnnotationExpr and its subclasses
329 * Issue 21: Java 5 JavaParser compiled JARs
330 * Issue 22: Please use java.lang.reflect.Modifier constants in japa.parser.ast.body.ModifierSet
331 * Issue 27: Implement the "equal" method
332 * Issue 30: equals and hashCode methods
333
334Version 1.0.7 (2009-04-12)
335-------------
336* Issue 19 fixed:
337* Tests changed to run with junit 4
338
339Version 1.0.6 (2009-01-11)
340-------------
341* Issue 11 fixed: changed method get/setPakage to get/setPackage in the class CompilationUnit
342* Created new visitor adapter to help AST modification: ModifierVisitorAdapter
343* Changed visitor adapters to abstract
344
345Version 1.0.5 (2008-10-26)
346-------------
347* Created simplified constructors in the nodes of the AST (without positional arguments)
348* Created ASTHelper class with some helpful methods (more methods are still needed)
349
350Version 1.0.4 (2008-10-07)
351-------------
352* Moved to javacc 4.1.
353* The java_1_5.jj can be build alone without compilation errors
354
355Version 1.0.3 (2008-09-06)
356-------------
357* Removed SuperMemberAccessExpr class, it was no longer used
358* Removed the methods get/setTypeArgs() from ArrayCreationExpr, this node shouldn't have these methods.
359* Fixed the bug with start/end position of the nodes IntegerLiteralMinValueExpr and LongLiteralMinValueExpr
360* The methods get/setAnnotations() from all BodyDeclaration subclasses were pushed down to BodyDeclaration class
361
362Version 1.0.2 (2008-07-20)
363-------------
364* Issue fixed: Issue 1: Add support for editing AST nodes or create new ones
365
366Version 1.0.1 (2008-07-01)
367-------------
368* Issue fixed: Issue 5: end line and end column equal to begin line and begin column
369
370Version 1.0.0 (2008-06-25)
371-------------
372* Changed version numbering, starting version 1.0.0
373* Javadoc done for packages:
374 * japa.parser
375 * japa.parser.ast
376* Corrected bug when parsing in multithread:
377 * JavaParser.setCacheParser(false) must be called before to use the parser concurrent
378
3792008-06-19
380-------------
381* No code changes, added binary distribution to download page
382
3832008-06-11
384-------------
385* Bug corrected: NPE in VoidVisitorAdapter
386 * http://code.google.com/p/javaparser/issues/detail?id=2
387
3882008-06-09
389-------------
390* Added Adapters for de visitors
391
3922008-05-28
393-------------
394* This project now is published at Google Code:
395 * http://code.google.com/p/javaparser/
396
3972008-05-25
398-------------
399* Added support for comments and javadoc to the tree.
400 * Javadocs are stored directly to members (BodyDeclaration and all deriveds (classes, methods, fields, etc.)), accessible by the method getJavadoc().
401 * All comments are stored in the CompilationUnit, accessible by the method getComments().
402
4032008-04-01
404-------------
405* Changed all nodes public attributes to be private and created getters to access them
406* Changed the methods of the Node getLine e getColumn to getBeginLine and getBeginColumn
407* Added the methods getEndLine and getEndColumn to the Node class (works only in the BlockNode)
408
4092007-12-22
410-------------
411* Corrected ConditionalExpression bug
412
4132007-10-21
414-------------
415* Added LGPL License
416
4172007-10-21
418-------------
419* Bugs corrected:
420 * Created PackageDeclaration member of CompilationUnit to add suport for annotations in the package declaration
421 * Parameterized anonymous constructor invocation
422 * Explicit constructor invotation Type Arguments
423 * ctrl+z ("\u001A") ar end of compilation unit
424
4252007-10-09
426-------------
427* EnumConstantDeclaration annotation support corrected
428* Parssing Java Unicode escape characters suport added
429
4302007-10-03
431-------------
432* Bug corrected: "MotifComboPopup.this.super()" statement was generating parser error
433
4342007-10-01
435-------------
436* Bug corrected: Casting signed primitive values
437```
438 double d = (double) -1;
439 ^
440```
4412007-08-06
442-------------
443* Bug with the single line comments in the final of the unit corrected
444
4452007-07-31
446-------------
447* Fixed the bug with the following expression: `Class c = (int.class);`
448
4492007-06-26
450-------------
451* Bug fixes from Leon Poyyayil work
452 * suport for hex floating point
453 * unicode digits in indentifier
454 * MemberValueArrayInitializer
455
4562007-03-09
457-------------
458* Long and Integer literal MIN_VALUE bug
459
4602007-02-24
461-------------
462* '\0' bug fixed
463
4642007-02-01
465-------------
466* Many bug fixes
467* Added line/column to nodes