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