| <!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="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.21 - 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> |
| <!-- ******************* End of JUnit ************************************* --> |
| |
| <!-- ******************* Java Editor ************************************* --> |
| <tr> |
| <td id="JavaEditor" class="section" colspan="2"> |
| <h2>Java Editor </h2> |
| </td> |
| </tr> |
| |
| <tr id="stringbuffer-to-stringbuilder"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569835 --> |
| <td class="title"><a href="#stringbuffer-to-stringbuilder">Use StringBuilder instead of StringBuffer clean up</a></td> |
| <td class="content"> |
| A new clean up has been added that converts code to use <code>StringBuilder</code> (added in Java 1.5) rather than <code>StringBuffer</code> which has synchronized methods and is slower than using <code>StringBuilder</code>. |
| <p> |
| There is a sub-option where changes will only occur to local variables which is on by default. When this sub-option is on, changes will only occur to <code>StringBuffer</code> variables that are local to a method. When a method calls other methods with such variables or assigns to/from fields/parameters, the method contents will not be converted. It is permitted to append <code>StringBuffer</code> fields or parameters to local <code>StringBuffer</code> variables which can then still be converted to <code>StringBuilder</code>. |
| </p> |
| <p> |
| When the option is selected and the sub-option for local variables is off,all usage of <code>StringBuffer</code> in the selected files are changed to <code>StringBuilder</code> regardless of usage. It should be noted that in this case, the clean up will not track down non-selected classes and methods that are referenced and might require changes to compile successfully. |
| </p> |
| <p> |
| To apply the clean up, select the <b>Use StringBuilder instead of StringBuffer</b> check box on the <b>Optimization</b> tab in your clean up profile. To specify just for local variables, select the <b>Only for local variables</b> check box found just below. |
| </p> |
| <p><img src="images/stringbuffer-to-stringbuilder-prefs.png" alt="Preferences" width="800"/></p> |
| <p> |
| For the given code: |
| </p> |
| <p><img src="images/stringbuffer-to-stringbuilder-before.png" alt="Before"/></p> |
| <p> |
| One gets: |
| </p> |
| <p><img src="images/stringbuffer-to-stringbuilder-after.png" alt="After"/></p> |
| </td> |
| </tr> |
| |
| <tr id="create-permitted-type-declaration"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=573980 --> |
| <td class="title"><a href="#declare-sealed-interface-as-super-interface">Quick fix to declare sealed interface as super interface</a></td> |
| <td class="content"> |
| You can use the following quick fix (<b>Ctrl+1</b>) to declare a sealed interface as super interface of its permitted types: |
| <p><img src="images/declare-sealed-interface-as-super-interface.png" alt=""/></p> |
| <p> |
| </p> |
| </td> |
| </tr> |
| <tr id="add-to-permitted-types"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=574526 --> |
| <td class="title"><a href="#add-sub -type-as-permitted -type-of-sealed-type">Quick fix to add the sub type to permitted types of sealed super type</a></td> |
| <td class="content"> |
| You can use the following quick fix (<b>Ctrl+1</b>) to add a sub type to permitted types of a sealed super type: |
| <p><img src="images/add-subtype-to-permitted-types-of-supertype.png" alt=""/></p> |
| <p> |
| </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> |