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