blob: 10bd0e09ef168975d7b773c2ed5cd0410ddff792 [file] [log] [blame]
<!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&trade; 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="#JavaCompiler">Java Compiler</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&trade; 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="declare-as-super-interface"> <!-- 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="declare-as-super-class"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=574860 -->
<td class="title"><a href="#declare-sealed-class-as-super-class">Quick fix to declare sealed class as super class</a></td>
<td class="content">
You can use the following quick fix (<b>Ctrl+1</b>) to declare a sealed class as super class of its permitted classes:
<p><img src="images/declare-sealed-class-as-super-class.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>
<tr id="external_annotations_all_locations"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=574603 -->
<td class="title">Find external annotations anywhere</td>
<td class="content">
External annotations, which are used for annotation based null analysis, can now be associated
to unannotated classes more freely.
<p>Previously, all external annotations where declared per build path entry. I.e., whenever a project of yours
uses a library for which external annotations exist, you would need to explicitly declare where
the corresponding external annotations for this particular library can be found.</p>
<p>A new compiler preference has been added by which you can instruct the compiler to search
for external annotations in all build path locations of the current project.</p>
<p><img src="images/external_annotations_all_locations.png" alt=""/></p>
<p>
When enabled, this strategy will be applied to all class files encountered during compilation.</p>
<p>Some examples, where this option is useful:</p>
<ul><li>A project A contains generated sources (in a separate source folder), which are decorated using
external annotations in the same project. When project A ships a jar containing also the external annotations,
any client of A will immediately see the generated classes with their external annotations applied.</li>
<li>When dedicated jars have been created, each containing external annotations for a set of libraries,
you only have to add these annotation jars to your build path and enable the new option, without worrying
which annotation jar corresponds to which individual dependency (dependencies).
The compiler will match external annotations to class files with no further help.
</li>
</ul>
<p>For batch compilation a corresponding option already exists. To match the above strategy in CI-builds,
just add the following to the compiler command line (verbatim):
<br/>
<code>-annotationpath CLASSPATH</code>
</p>
</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>