| <!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 2021. 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="news.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>Eclipse Project 4.20 - New and Noteworthy</title> |
| </head> |
| |
| <body> |
| <h2>Java development tools</h2> |
| <ul> |
| <!--<li><a href="#JavaXX">Java™ XX Support</a></li>--> |
| <li><a href="#JUnit">JUnit</a></li> |
| <li><a href="#JavaEditor">Java Editor</a></li> |
| <li><a href="#JavaViewsAndDialogs">Java Views and Dialogs</a></li> |
| <li><a href="#JavaFormatter">Java Formatter</a></li> |
| <li><a href="#Debug">Debug</a></li> |
| <li><a href="#JDTDev">JDT Developers</a></li> |
| </ul> |
| |
| <!-- ****************** START OF N&N TABLE ****************** --> |
| <table class="news"> |
| <colgroup> |
| <col class="title" /> |
| <col /> |
| </colgroup> |
| <tbody> |
| |
| <!-- ******************* Java XX Support ************************************* --> |
| <!-- |
| <tr> |
| <td id="JavaXX" class="section" colspan="2"> |
| <h2>Java™ XX Support </h2> |
| </td> |
| </tr> |
| --> |
| <!-- ******************* End of Java XX Support ************************************* --> |
| |
| <!-- ******************* JUnit ************************************* --> |
| <tr> |
| <td id="JUnit" class="section" colspan="2"> |
| <h2>JUnit</h2> |
| </td> |
| </tr> |
| |
| <tr id="junit-runtime-bree"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=571009 --> |
| <td class="title">BREE update for JDT JUnit runtime bundles</td> |
| <td class="content"> |
| The bundle required execution environment (BREE) for the <code>org.eclipse.jdt.junit.runtime</code> and <code>org.eclipse.jdt.junit4.runtime</code> bundles is now JavaSE-1.8. |
| </td> |
| </tr> |
| |
| <!-- ******************* End of JUnit ************************************* --> |
| |
| <!-- ******************* Java Editor ************************************* --> |
| <tr> |
| <td id="JavaEditor" class="section" colspan="2"> |
| <h2>Java Editor </h2> |
| </td> |
| </tr> |
| |
| <tr id="use-instanceof"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569835 --> |
| <td class="title"><a href="#use-instanceof">Use instanceof</a></td> |
| <td class="content"> |
| A new clean up has been added that uses an <code>instanceof</code> expression to check an object against a hardcoded class. |
| <p> |
| The expression must be a supertype of the targeted class. |
| </p> |
| <p> |
| To apply the clean up, select <b>Use instanceof keyword instead of Class.isInstance()</b> check box on the <b>Code Style</b> tab in your clean up profile. |
| </p> |
| <p><img src="images/use-instanceof-preferences.png" alt="Preferences" width="800"/></p> |
| <p> |
| For the given code: |
| </p> |
| <p><img src="images/use-instanceof-before.png" alt="Before"/></p> |
| <p> |
| One gets: |
| </p> |
| <p><img src="images/use-instanceof-after.png" alt="After"/></p> |
| </td> |
| </tr> |
| |
| <tr id="operand-factorization"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569666 --> |
| <td class="title"><a href="#operand-factorization">Operand factorization clean up</a></td> |
| <td class="content"> |
| A new clean up has been added that replaces <code>(X && Y) || (X && Z)</code> by <code>(X && (Y || Y))</code>. |
| <p> |
| The operands must be passive and primitive. |
| </p> |
| <p> |
| To apply the clean up, select <b>Replace (X && Y) || (X && Z) by (X && (Y || Z))</b> check box on the <b>Duplicate code</b> tab in your clean up profile. |
| </p> |
| <p><img src="images/operand-factorization-preferences.png" alt="Preferences" width="800"/></p> |
| <p> |
| For the given code: |
| </p> |
| <p><img src="images/operand-factorization-before.png" alt="Before"/></p> |
| <p> |
| One gets: |
| </p> |
| <p><img src="images/operand-factorization-after.png" alt="After"/></p> |
| </td> |
| </tr> |
| |
| <tr id="valueof-rather-than-instantiation"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=572234 --> |
| <td class="title"><a href="#valueof-rather-than-instantiation">valueOf() rather than instantiation clean up</a></td> |
| <td class="content"> |
| A new clean up has been added that replaces unnecessary primitive wrappers instance creations by using static factory methods (<code>valueOf()</code>). |
| <p> |
| It dramatically improves the space performance. |
| </p> |
| <p> |
| To apply the clean up, select <b>valueOf() rather than instantiation</b> check box on the <b>Optimization</b> tab in your clean up profile. |
| </p> |
| <p><img src="images/valueof-rather-than-instantiation-preferences.png" alt="Preferences" width="800"/></p> |
| <p> |
| For the given code: |
| </p> |
| <p><img src="images/valueof-rather-than-instantiation-before.png" alt="Before"/></p> |
| <p> |
| One gets: |
| </p> |
| <p><img src="images/valueof-rather-than-instantiation-after.png" alt="After"/></p> |
| </td> |
| </tr> |
| |
| <tr id="implicit-comparator"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=572426 --> |
| <td class="title"><a href="#implicit-comparator">Implicit comparator clean up</a></td> |
| <td class="content"> |
| A new clean up has been added that removes the comparator declaration if it is the default one. |
| <p> |
| The declared comparator should be an equivalent to the natural order. |
| It removes anonymous class, lambda, <code>Comparator.comparing()</code>, <code>Comparator.naturalOrder()</code> and <code>null</code>. |
| It applies on <code>List.sort(Comparator)</code>, <code>Collections.sort(List, Comparator)</code>, <code>Collections.max(Collection, Comparator)</code> and <code>Collections.min(Collection, Comparator)</code>. |
| If the comparator is used in the method <code>List.sort(Comparator)</code>, the method is converted into <code>Collections.sort(List)</code>. |
| </p> |
| <p> |
| To apply the clean up, select <b>Use implicit comparator when possible</b> check box on the <b>Unnecessary Code</b> tab in your clean up profile. |
| </p> |
| <p><img src="images/implicit-comparator-preferences.png" alt="Preferences" width="800"/></p> |
| <p> |
| For the given code: |
| </p> |
| <p><img src="images/implicit-comparator-before.png" alt="Before"/></p> |
| <p> |
| One gets: |
| </p> |
| <p><img src="images/implicit-comparator-after.png" alt="After"/></p> |
| </td> |
| </tr> |
| |
| <tr id="array-with-curly"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=571977 --> |
| <td class="title"><a href="#array-with-curly">Initialize array with curly clean up</a></td> |
| <td class="content"> |
| A new clean up has been added that replaces the new instance syntax by curly brackets to create an array. |
| <p> |
| It must be an initialization of a declaration. |
| The declaration must have the same type. |
| </p> |
| <p> |
| To apply the clean up, select <b>Create array with curly when possible</b> check box on the <b>Unnecessary Code</b> tab in your clean up profile. |
| </p> |
| <p><img src="images/array-with-curly-preferences.png" alt="Preferences" width="800"/></p> |
| <p> |
| For the given code: |
| </p> |
| <p><img src="images/array-with-curly-before.png" alt="Before"/></p> |
| <p> |
| One gets: |
| </p> |
| <p><img src="images/array-with-curly-after.png" alt="After"/></p> |
| </td> |
| </tr> |
| |
| <!-- ******************* End of Java Editor ************************************* --> |
| |
| <!-- ******************* Java Views and Dialogs ************************************* --> |
| <tr> |
| <td id="JavaViewsAndDialogs" class="section" colspan="2"> |
| <h2>Java Views and Dialogs</h2> |
| </td> |
| </tr> |
| <!-- ******************* End of Java Views and Dialogs ************************************* --> |
| |
| <!-- ******************* Java Compiler ************************************* --> |
| <tr> |
| <td id="JavaCompiler" class="section" colspan="2"> |
| <h2>Java Compiler</h2> |
| </td> |
| </tr> |
| <!-- ******************* End of Java Compiler ************************************* --> |
| |
| <!-- ******************* Java Formatter ************************************* --> |
| <tr> |
| <td id="JavaFormatter" class="section" colspan="2"> |
| <h2>Java Formatter </h2> |
| </td> |
| </tr> |
| <!-- ******************* End of Java Formatter ************************************* --> |
| |
| <!-- *********************** Debug ******************************** --> |
| <tr> |
| <td id="Debug" class="section" colspan="2"> |
| <h2>Debug</h2> |
| </td> |
| </tr> |
| <!--************************ End of Debug ******************************** --> |
| |
| <!-- *********************** JDT Developers ******************************** --> |
| <tr> |
| <td id="JDTDev" class="section" colspan="2"> |
| <h2>JDT Developers</h2> |
| </td> |
| </tr> |
| <!-- *********************** End of JDT Developers ******************************** --> |
| </tbody> |
| </table> |
| <!-- ****************** END OF N&N TABLE ****************** --> |
| |
| <script type="text/javascript" src="scripts.js"></script> |
| <p style="text-align:center"> |
| <a href="platform.php">Previous</a> <a style="margin:1em" href=".">Up</a> <a href="platform_isv.php">Next</a> |
| </p> |
| </body> |
| </html> |