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