| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta name="copyright" content="Copyright (c) Eclipse contributors and others 2018, 2019. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page."/> |
| <meta http-equiv="Content-Language" content="en-us"/> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| <link rel="STYLESHEET" href="../book.css" type="text/css"/> |
| <style type="text/css"> |
| body {max-width: 900px;} |
| table.news col.title {width: 30%;} |
| /*img {max-width: 520px;}*/ |
| table.news {table-layout: fixed; border-collapse: collapse; width: 100%;} |
| table.news td {border-top: solid thin black; padding: 10px; overflow: visible;} |
| table.news tr {vertical-align: top;} |
| table.news tr td.section {font-size: 20px; font-weight: bold;} |
| table.news tr td.title {vertical-align: top; font-weight: bold;} |
| table.news tr td.content {vertical-align: top;} |
| ul {padding-left: 13px;} |
| </style> |
| <title>What's New in Eclipse 4.13 (JDT)</title> |
| </head> |
| |
| <body> |
| <h2>What's New in Eclipse 4.13 (JDT)</h2> |
| <p>Here are descriptions of some of the more interesting or significant changes made to the Java development tools (JDT) |
| for the 4.12 release of Eclipse. |
| They are grouped into:</p> |
| <ul> |
| <li><a href="#JavaViewsAndDialogs">Java Views and Dialogs</a></li> |
| <li><a href="#JavaEditor">Java Editor</a></li> |
| <li><a href="#JavaFormatter">Java Formatter</a></li> |
| <li><a href="#JUnit">JUnit</a></li> |
| <li><a href="#Debug">Debug</a></li> |
| </ul> |
| |
| <p>See also the <b><a href="../../org.eclipse.platform.doc.user/whatsNew/platform_whatsnew.html">Eclipse Platform What's New</a></b> |
| document for changes in the Platform.</p> |
| <p>We also recommend to read the <a href="../tips/jdt_tips.html">Tips and Tricks</a>.</p> |
| <br/> |
| |
| <!-- ****************** START OF N&N TABLE****************** --> |
| <table class="news"> |
| <colgroup> |
| <col class="title" /> |
| <col /> |
| </colgroup> |
| <tbody> |
| |
| |
| <!-- ******************* Java Views and Dialogs ************************************* --> |
| <tr> |
| <td id="JavaViewsAndDialogs" class="section" colspan="2"> |
| <h2>Java Views and Dialogs</h2> |
| </td> |
| </tr> |
| |
| <tr id="console-output-synchronization"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=32205 --> |
| <td class="title">Synchronize standard and error output in console</td> |
| <td class="content"> |
| The Eclipse <b>Console view</b> currently can not ensure that mixed standard and error output is shown in the same order |
| as it is produced by the running process. For Java applications the launch configuration <b>Common Tab</b> now |
| provides an option to merge standard and error output. This ensures that standard and error output is shown in the |
| same order it was produced but at the same time disables the individual coloring of error output. |
| <p><img src="images/merge-process-output.png" alt="Differences between merging enabled and disabled"/></p> |
| </td> |
| </tr> |
| <!-- ******************* End of Java Views and Dialogs ************************************* --> |
| |
| <!-- ******************* Java Editor ************************************* --> |
| <tr> |
| <td id="JavaEditor" class="section" colspan="2"> |
| <h2>Java Editor</h2> |
| </td> |
| </tr> |
| |
| <tr id="foreach-loop-collections"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=548002 --> |
| <td class="title">Convert to enhanced 'for' loop using Collections</td> |
| <td class="content"> |
| The Java quickfix/cleanup <b>Convert to enhanced 'for' loop</b> is now offered on <code>for</code> loops that are iterating through Collections. The |
| loop must reference the <code>size</code> method as part of the condition and if accessing elements in the body, must use the <code>get</code> |
| method. All other Collection methods other than <code>isEmpty</code> invalidate the quickfix being offered. |
| <p><img src="images/foreachcollectionbefore.png" alt="for loop using Collections before"/></p> |
| <p><img src="images/foreachcollectionquickfix.png" alt="for loop using Collections quickfix"/></p> |
| <p><img src="images/foreachcollectionafter.png" alt="for loop using Collections after"/></p> |
| </td> |
| </tr> |
| |
| <tr id="final-fields-quickfix"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=83544 --> |
| <td class="title">Initialize 'final' fields</td> |
| <td class="content"> |
| A Java quickfix is now offered to initialize an uninitialized <code>final</code> field in the class constructor. The fix will initialize a <code>String</code> to the empty string, a numeric base type to 0, and for class fields it initializes them using their default constructor if available or <code>null</code> if no default constructor exists. |
| <p><img src="images/finalquickfix1.png" alt="unitialized final field before"/></p> |
| <p><img src="images/finalquickfix2.png" alt="final field initialized in constructor"/></p> |
| </td> |
| </tr> |
| |
| <tr id="autoboxing-unboxing"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=549242 --> |
| <td class="title">Autoboxing and Unboxing</td> |
| <td class="content"> |
| Use Autoboxing and Unboxing when possible. These features are enabled only for Java 5 and higher. |
| <p><img src="images/autoboxing-unboxing-feature.png" alt=""/></p> |
| </td> |
| </tr> |
| |
| <tr id="enhanced-redundant-modifier-removal"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=549242 --> |
| <td class="title">Improved redundant modifier removal</td> |
| <td class="content"> |
| <b>Remove redundant modifier</b> now also removes useless <code>abstract</code> modifier on the interfaces. |
| <p><img src="images/abstract-removal-feature.png" alt=""/></p> |
| For the given code: |
| <p><img src="images/abstract-removal-before.png" alt=""/></p> |
| You get this: |
| <p><img src="images/abstract-removal-after.png" alt=""/></p> |
| </td> |
| </tr> |
| |
| <tr id="javadoc-for-module-info"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=546350 --> |
| <td class="title">Javadoc comment generation for module</td> |
| <td class="content"> |
| Adding a Javadoc comment to a Java module (module-info.java) will result in automatic annotations being added per the new module comment preferences. |
| <p><img src="images/modulejavadocprefs.png" alt="Javadoc module comment preferences"/></p> |
| <p> |
| The <code>$(tags)</code> directive will add <code>@uses</code> and <code>@provides</code> tags for all <b>uses</b> and <b>provides</b> module statements. |
| </p> |
| <p><img src="images/modulejavadoc.png" alt="Javadoc module comment example"/></p> |
| </td> |
| </tr> |
| <!-- ******************* End of Java Editor ************************************* --> |
| |
| <!-- ******************* Java Formatter ************************************* --> |
| <tr> |
| <td id="JavaFormatter" class="section" colspan="2"> |
| <h2>Java Formatter </h2> |
| </td> |
| </tr> |
| <tr id="remove-excess-blank-lines"><!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=549255 --> |
| <td class="title">Remove excess blank lines</td> |
| <td class="content"> |
| All the settings in the <b>Blank lines</b> section can now be configured to <b>remove excess blank lines</b>, effectively taking precedence over the <i>Number of empty lines to preserve</i> setting. |
| Each setting has its own button to turn the feature on, right next to its number control. |
| The button is enabled only if the selected number of lines is smaller than the <i>Number of empty lines to preserve</i>, because otherwise any excess lines are removed anyway. |
| <p> |
| <img src="images/formatter-remove-excess-blank-lines.png" alt="" /> |
| </p> |
| </td> |
| </tr> |
| <tr id="blank-lines-changes"><!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=550083 --> |
| <td class="title">Changes in blank lines settings</td> |
| <td class="content"> |
| There's quite a lot of changes in the <b>Blank lines</b> section of the formatter profile. |
| <p> |
| Some of the existing subsections and settings are now phrased differently to better express their function: |
| </p> |
| <ul> |
| <li>The <i>Blank lines within class declarations</i> subsection is now <i>Blank lines within type declaration</i></li> |
| <li><i>Before first declaration</i> is now <i>Before first member declaration</i></li> |
| <li><i>Before declarations of the same kind</i> is now <i>Between member declarations of different kind</i></li> |
| <li><i>Before member class declarations</i> is now <i>Between member type declarations</i></li> |
| <li><i>Before field declarations</i> is now <i>Between field declarations</i></li> |
| <li><i>Before method declarations</i> is now <i>Between method/constructor declarations</i></li> |
| </ul> |
| <p> |
| More importantly, a few new settings have been added to support more places where the number of empty lines can be controlled: |
| </p> |
| <ul> |
| <li><i>After last member declaration</i> in a type (to complement previously existing <i>Before first member declaration</i> setting)</li> |
| <li><i>Between abstract method declarations</i> in a type (these cases were previously handled by <i>Between method/constructor declarations</i>)</li> |
| <li><i>At end of method/constructor body</i> (to complement previously existing <i>At beginning of method/constructor body</i> setting)</li> |
| <li><i>At beginning of code block</i> and <i>At end of code block</i></li> |
| <li><i>Before statement with code block</i> and <i>After statement with code block</i></li> |
| <li><i>Between statement groups in 'switch'</i></li> |
| </ul> |
| <p> |
| Most of the new settings have been put in a new subsection <b>Blank lines within method/constructor declarations</b>. |
| </p> |
| <p> |
| <img src="images/formatter-new-blank-lines-settings.png" alt="" /> |
| </p> |
| </td> |
| </tr> |
| <!-- ******************* End of Java Formatter ************************************* --> |
| |
| <!-- ******************* JUnit ************************************* --> |
| <tr> |
| <td id="JUnit" class="section" colspan="2"> |
| <h2>JUnit</h2> |
| </td> |
| </tr> |
| <tr id="junit-5.5.1"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=548964 --> |
| <td class="title">JUnit 5.5.1</td> |
| <td class="content"> |
| <a href="https://junit.org/junit5/docs/5.5.1/release-notes/" target="_blank">JUnit 5.5.1</a> is here and Eclipse JDT has been updated to use this version. |
| </td> |
| </tr> |
| <!-- ******************* End of JUnit ************************************* --> |
| |
| <!-- *********************** Debug ******************************** --> |
| <tr> |
| <td id="Debug" class="section" colspan="2"> |
| <h2>Debug</h2> |
| </td> |
| </tr> |
| <tr id="enhanced-patch-module-support"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=546738 --> |
| <td class="title">Enhanced support for --patch-module during launch</td> |
| <td class="content"> |
| The <b>Java Launch Configuration</b> now supports patching of different modules by different sources during the launch. This can be verified in the <b>Override Dependencies...</b> dialog |
| in the <b>Dependencies</b> tab in a Java Launch Configuration. |
| <p><img src="images/launch-dependencies.png" alt=""/></p> |
| <p><img src="images/enhanced-patch-module.png" alt=""/></p> |
| </td> |
| </tr> |
| <!--************************ End of Debug ******************************** --> |
| |
| <!-- ******************* Java Build ************************************* --> |
| <tr> |
| <td id="JavaBuild" class="section" colspan="2"> |
| <h2>Java Build</h2> |
| </td> |
| </tr> |
| |
| <tr id="full-build-on-jdt-core-settings-change"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=549457 --> |
| <td class="title">Full build on JDT core preferences change</td> |
| <td class="content"> |
| Manually changing the settings file <b>.settings/org.eclipse.jdt.core.prefs</b> of a project |
| will result in a full project build, if the workspace auto-build is on. For example, pulling |
| different settings from a git repository or generating the settings with a tool will now trigger a build. |
| Note that this includes timestamp changes, even if actual settings file contents were not changed. |
| <p>For the 4.13 release, it is possible to disable this new behavior with the VM property: |
| <b><span style="white-space: nowrap;">-Dorg.eclipse.disableAutoBuildOnSettingsChange=true</span></b>. |
| It is planned to remove this VM property in a future release.</p> |
| </td> |
| </tr> |
| <!-- ******************* End of Java Build ************************************* --> |
| </tbody> |
| </table> |
| <!-- ****************** END OF N&N TABLE ****************** --> |
| |
| </body> |
| </html> |