blob: f5454f1ca8df33afaf7d4b078e9625e2a6cd5601 [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 2020. 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.19 (JDT)</title>
</head>
<body>
<h2>What's New in Eclipse 4.19 (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.19 release of Eclipse.
They are grouped into:</p>
<ul> <!-- NOTE: Sync ../topics_WhatsNew.xml with this! -->
<!--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="#JavaFormatter">Java Formatter</a></li-->
<li><a href="#Debug">Debug</a></li>
<!--li><a href="#JDTDev">JDT Developers</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 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>
<tr id="junit-5.7.1"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570974 -->
<td class="title"><a href="#junit-5.7.1">JUnit 5.7.1</a></td>
<td class="content">
<a href="https://junit.org/junit5/docs/5.7.1/release-notes/#release-notes-5.7.1/" target="_blank">JUnit 5.7.1</a> is here and Eclipse JDT has been updated to use this version.
</td>
</tr>
<!-- ******************* End of JUnit ************************************* -->
<!-- ******************* Java Editor ************************************* -->
<tr>
<td id="JavaEditor" class="section" colspan="2">
<h2>Java Editor</h2>
</td>
</tr>
<tr id="try-with-resources-quick-assist"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570184 -->
<td class="title"><a href="#try-with-resources-quick-assist">Quick assist to create try-with-resources</a></td>
<td class="content">
For expressions returning a type that is <code>AutoClosable</code> there's a new quick assist (<b>Ctrl+1</b>) available: <b>Assign to new local variable in try-with-resources</b>.
<p><img src="images/try-with-resources-before.png" alt="Bef"/></p>
<p>
It creates a new try-with-resources block with the expression assigned to a resource variable.
The variable type and name can be selected from a few suggestions:
</p>
<p><img src="images/try-with-resources-after.png" alt=""/></p>
<p>
The default hotkey sequence for this quick assist is <b>Ctrl+2</b> followed by <b>T</b>.
</p>
</td>
</tr>
<tr id="add-catch-to-try-with-resources-assists"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570762 -->
<td class="title"><a href="#add-catch-to-try-with-resources-assists">Add catch clause to try-with-resources assists</a></td>
<td class="content">
There are multiple assists to surround auto-closeable statements in a try-with-resources statement including <b>Surround with &gt; Try-with-resources Block</b>. Now, all forms will add
a <code>catch</code> clause for any exceptions (such as <code>IOException</code>) thrown by the auto-close if not already handled via an existing <code>catch</code> clause
or <code>throws</code> directive. In the case where the existing code catches or throws an exception that sub-classes the exceptions of the new <code>catch</code> clause, an
additional <code>catch</code> clause will be added to rethrow the exception to ensure code logic remains consistent.
<p><img src="images/add-catch-clause-to-try-with-resources-before.png" alt=""/></p>
<p><img src="images/add-catch-clause-to-try-with-resources-after.png" alt=""/></p>
</td>
</tr>
<tr id="create-permitted-type-declaration"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570440 -->
<td class="title"><a href="#create-permitted-type-declaration">Quick fix to create permitted type declaration</a></td>
<td class="content">
You can use the following quick fixes (<b>Ctrl+1</b>) to create a new permitted class or interface declaration:
<p><img src="images/create-permitted-type-declaration.png" alt=""/></p>
<p>
The created type will declare the <code>sealed</code> type as its super type and
it can be declared as final, non-sealed, or sealed with the available quick fixes for further inheritance control.
</p>
</td>
</tr>
<tr id="java-feature"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569711 -->
<td class="title"><a href="#java-feature">Java Feature clean ups</a></td>
<td class="content">
A new tab named <b>Java Feature</b> has been added to the <b>Clean Up </b>preferences. It lists the clean up options that introduce the use of language features from different Java versions. Relevant clean up options from other tabs have also been moved to this new tab.
<p>
You can use these clean ups while upgrading the Java version in your code.
</p>
<p><img src="images/java-feature-preferences.png" alt="Preferences" width="800"/></p>
</td>
</tr>
<tr id="pattern-matching"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=566001 -->
<td class="title"><a href="#pattern-matching">Pattern matching for instanceof clean up</a></td>
<td class="content">
A new clean up has been added that uses pattern matching for the <code>instanceof</code> operator when possible.
<p>
It is only applicable for Java 15 or higher when preview features are enabled.
</p>
<p>
To apply the clean up, select <b>Pattern matching for instanceof</b> check box on the <b>Java Feature</b> tab in your clean up profile.
</p>
<p><img src="images/pattern-matching-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/pattern-matching-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/pattern-matching-after.png" alt="After"/></p>
</td>
</tr>
<tr id="reduce-indentation"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570491 -->
<td class="title"><a href="#reduce-indentation">Reduce indentation clean up</a></td>
<td class="content">
A new clean up has been added that removes useless indentation when the opposite workflow falls through.
<p>
When several blocks fall through, it reduces the block with the greatest indentation.
It can negate an <code>if</code> condition if the <i>else</i> statements fall through.
</p>
<p>
To apply the clean up, select <b>Reduce indentation when possible</b> check box on the <b>Code Style</b> tab in your clean up profile.
</p>
<p><img src="images/reduce-indentation-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/reduce-indentation-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/reduce-indentation-after.png" alt="After"/></p>
</td>
</tr>
<tr id="extract-increment"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570011 -->
<td class="title"><a href="#extract-increment">Extract increment clean up</a></td>
<td class="content">
A new clean up has been added that moves increment or decrement outside an expression.
<p>
A prefix increment/decrement (<code>++i</code>) first changes the value of the variable and then returns the updated value.
A postfix increment/decrement (<code>i++</code>) first returns the original value and then changes the value of the variable.
</p>
<p>
But let's look at this code:
</p>
<p>
<span style="display: block;unicode-bidi: embed;font-family: monospace;white-space: pre;">int i = j++;</span>
</p>
<p>
Most of the developers hardly remember which from the increment or the assignment comes first. One way to make the code obvious is to write the increment/decrement in a dedicated statement:
</p>
<p>
<span style="display: block;unicode-bidi: embed;font-family: monospace;white-space: pre;">int i = j;
j++;</span>
</p>
<p>
And so for the prefix expressions:
</p>
<p>
<span style="display: block;unicode-bidi: embed;font-family: monospace;white-space: pre;">int i = ++j;</span>
</p>
<p>
...it goes like this:
</p>
<p>
<span style="display: block;unicode-bidi: embed;font-family: monospace;white-space: pre;">j++;
int i = j;</span>
</p>
<p>
The cleanup moves a prefix expression above the statement and a postfix expression below.
It does not move increments from loop condition and it does not cleanup several increments in the same statement.
The increment/decrement is always rewritten as a postfix expression for standardization.
</p>
<p>
To apply the clean up, select <b>Extract increment/decrement from statement</b> check box on the <b>Code Style</b> tab in your clean up profile.
</p>
<p><img src="images/extract-increment-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/extract-increment-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/extract-increment-after.png" alt="After"/></p>
</td>
</tr>
<tr id="comparator-comparing"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570413 -->
<td class="title"><a href="#comparator-comparing">Use Comparator.comparing() clean up</a></td>
<td class="content">
A new clean up has been added that replaces a plain comparator instance by a lambda expression passed to a <code>Comparator.comparing()</code> method.
<p>
The feature is enabled only with Java 8 or higher.
</p>
<p>
The <code>Comparator</code> type must be inferred by the destination of the comparator.
The algorithm of the comparator must be standard and based on one field or method.
The cleanup can handle the null values and reversed orders.
</p>
<p>
To apply the clean up, select <b>Use Comparator.comparing()</b> check box on the <b>Java Feature</b> tab in your clean up profile.
</p>
<p><img src="images/comparator-comparing-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/comparator-comparing-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/comparator-comparing-after.png" alt="After"/></p>
</td>
</tr>
<tr id="multi-catch"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569879 -->
<td class="title"><a href="#multi-catch">Multi-catch clean up</a></td>
<td class="content">
A new clean up has been added that converts catch clauses with same body to Java 7's multi-catch.
<p>
The feature is enabled only with Java 7 or higher.
</p>
<p>
To apply the clean up, select <b>Use Multi-catch</b> check box on the <b>Java Feature</b> tab in your clean up profile.
</p>
<p><img src="images/multi-catch-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/multi-catch-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/multi-catch-after.png" alt="After"/></p>
</td>
</tr>
<tr id="convert-fields"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570029 -->
<td class="title"><a href="#convert-fields">Convert fields into local variables</a></td>
<td class="content">
A new clean up has been added that refactors a field into a local variable if its use is only local.
<p>
The previous value should not be read. The field should be <code>private</code>. The field should not be <code>final</code>. The field should be primitive. The field should not have annotations.
</p>
<p>
To apply the clean up, select <b>Convert fields into local variables if the use is only local</b> check box on the <b>Optimization</b> tab in your clean up profile.
</p>
<p><img src="images/convert-fields-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/convert-fields-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/convert-fields-after.png" alt="After"/></p>
</td>
</tr>
<tr id="static-inner-class"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569847 -->
<td class="title"><a href="#static-inner-class">Static inner class clean up</a></td>
<td class="content">
A new clean up has been added that makes inner class <code>static</code> if it doesn't use top level class members.
<p>
To apply the clean up, select <b>Make inner classes static where possible</b> check box on the <b>Optimization</b> tab in your clean up profile.
</p>
<p><img src="images/static-inner-class-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/static-inner-class-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/static-inner-class-after.png" alt="After"/></p>
</td>
</tr>
<tr id="string-replace"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=571040 -->
<td class="title"><a href="#string-replace">Use String.replace() clean up</a></td>
<td class="content">
A new clean up has been added that replaces <code>String.replaceAll()</code> by <code>String.replace()</code> when the pattern is a plain text.
<p>
The pattern must be constant.
</p>
<p>
To apply the clean up, select <b>Use String.replace() instead of String.replaceAll() when no regex used</b> check box on the <b>Optimization</b> tab in your clean up profile.
</p>
<p><img src="images/string-replace-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/string-replace-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/string-replace-after.png" alt="After"/></p>
</td>
</tr>
<tr id="primitive-comparison"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570589 -->
<td class="title"><a href="#primitive-comparison">Primitive comparison clean up</a></td>
<td class="content">
A new clean up has been added that replaces the <code>compareTo()</code> method by a comparison on primitive.
<p>
It improves the space and time performance.
The compared value must be a primitive.
</p>
<p>
To apply the clean up, select <b>Primitive comparison</b> check box on the <b>Optimization</b> tab in your clean up profile.
</p>
<p><img src="images/primitive-comparison-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/primitive-comparison-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/primitive-comparison-after.png" alt="After"/></p>
</td>
</tr>
<tr id="primitive-parsing"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570168 -->
<td class="title"><a href="#primitive-parsing">Primitive parsing clean up</a></td>
<td class="content">
A new clean up has been added that avoids to create primitive wrapper when parsing a string.
<p>
The object should be used as a primitive and not as a wrapper.
</p>
<p>
To apply the clean up, select <b>Primitive parsing</b> check box on the <b>Optimization</b> tab in your clean up profile.
</p>
<p><img src="images/primitive-parsing-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/primitive-parsing-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/primitive-parsing-after.png" alt="After"/></p>
</td>
</tr>
<tr id="control-flow-merge"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=568656 -->
<td class="title"><a href="#control-flow-merge">Pull down common code from if/else statement clean up</a></td>
<td class="content">
A new clean up has been added that extracts common code from the end of an <code>if</code> / <code>else if</code> / <code>else</code> control flow.
<p>
Ultimately it removes the empty and passive <code>if</code> conditions.
</p>
<p>
The control flow should have an <code>else</code> clause and the duplicate code should not rely on variables declared in the block.
</p>
<p>
The statement matching performs a deep analysis. All the blocks should end with the same set of statements, or the blocks with different code should fall through with a jump statement (<code>return</code>, <code>throw</code>, <code>continue</code> or <code>break</code>).
</p>
<p>
To apply the clean up, select <b>Pull down common code from if/else statement</b> check box on the <b>Duplicate code</b> tab in your clean up profile.
</p>
<p><img src="images/control-flow-merge-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/control-flow-merge-before.png" alt="Before cleaning similar tails of blocks"/></p>
<p>
One gets:
</p>
<p><img src="images/control-flow-merge-after.png" alt="After cleaning similar tails of blocks"/></p>
<p>
And for the given code where all tails of blocks are identical except one block which falls through:
</p>
<p><img src="images/control-flow-merge-jump-statement-before.png" alt="Before cleaning jump statement"/></p>
<p>
The identical tails of blocks have been pulled down from the control flow and the falling through block has been left as it is:
</p>
<p><img src="images/control-flow-merge-jump-statement-after.png" alt="After cleaning jump statement"/></p>
</td>
</tr>
<tr id="substring"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569800 -->
<td class="title"><a href="#substring">String.substring() clean up</a></td>
<td class="content">
A new clean up has been added that removes the second <code>substring()</code> parameter if this parameter is the length of the string. It's the default value.
<p>
It must reference the same expression.
</p>
<p>
The expression must be passive.
</p>
<p>
To apply the clean up, select <b>Redundant String.substring() parameter</b> check box on the <b>Unnecessary code</b> tab in your clean up profile.
</p>
<p><img src="images/substring-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/substring-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/substring-after.png" alt="After"/></p>
</td>
</tr>
<tr id="unreachable-block"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569845 -->
<td class="title"><a href="#unreachable-block">Unreachable block clean up</a></td>
<td class="content">
A new clean up has been added that detects two <code>if</code> conditions that are identical and removes the second one.
<p>
The conditions should be passive.
</p>
<p>
No exceptions should be awaited.
</p>
<p>
It doesn't create unreachable code below the <code>if</code> statement which would create a compile error.
That is to say it avoids the case where only the removed block doesn't fall through, all the other cases fall through,
there are an <code>else</code> clause (not only <code>if</code>/<code>else</code> clauses)
and a statement after the control workflow.
</p>
<p>
To apply the clean up, select <b>Unreachable block</b> check box on the <b>Unnecessary code</b> tab in your clean up profile.
</p>
<p><img src="images/unreachable-block-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/unreachable-block-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/unreachable-block-after.png" alt="After"/></p>
</td>
</tr>
<tr id="unlooped-while"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570375 -->
<td class="title"><a href="#unlooped-while">Unlooped while clean up</a></td>
<td class="content">
A new clean up has been added that replaces a <code>while</code> loop that always terminates during the first iteration by an <code>if</code>.
<p>
The loop should not contain any <code>continue</code> statement.
</p>
<p>
The loop should only contain <code>break</code> statements without statements after.
</p>
<p>
To apply the clean up, select <b>Convert loop into if when possible</b> check box on the <b>Unnecessary code</b> tab in your clean up profile.
</p>
<p><img src="images/unlooped-while-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/unlooped-while-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/unlooped-while-after.png" alt="After"/></p>
</td>
</tr>
<tr id="source-fixing"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570773 -->
<td class="title"><a href="#source-fixing">Source Fixing clean ups</a></td>
<td class="content">
A new tab named <b>Source Fixing</b> has been added to the <b>Clean Up</b> preferences. It lists the clean up options that fixes the behavior of the code. The <b>Compare with != 0 for bitwise expression</b> clean up option from <b>Code style</b> tab have also been moved to this new tab.
<p>
⚠️ Use it carefully. You may get an unexpected behavior. It may trigger zombie code. A zombie code is a dead code that is dead because an error occurs before. The day someone fixes the error, the zombie code comes back to life and alters the behavior. Although most of the cleanups need review, those ones need testing.
</p>
<p><img src="images/source-fixing-preferences.png" alt="Preferences" width="800"/></p>
</td>
</tr>
<tr id="invert-equals"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=571184 -->
<td class="title"><a href="#invert-equals">Object.equals() on non null clean up</a></td>
<td class="content">
A new clean up has been added that inverts calls to <code>Object.equals(Object)</code> and <code>String.equalsIgnoreCase(String)</code> to avoid useless null pointer exception.
<p>
The caller must be nullable.
</p>
<p>
The parameter must not be nullable.
</p>
<p>
Beware! By avoiding null pointer exceptions, the behavior may change!
</p>
<p>
To apply the clean up, select <b>Avoid Object.equals() or String.equalsIgnoreCase() on null objects</b> check box on the <b>Source Fixing</b> tab in your clean up profile.
</p>
<p><img src="images/invert-equals-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/invert-equals-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/invert-equals-after.png" alt="After"/></p>
</td>
</tr>
<tr id="comparison-zero"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570592 -->
<td class="title"><a href="#comparison-zero">Comparison to zero clean up</a></td>
<td class="content">
A new clean up has been added that fixes <code>Comparable.compareTo()</code> usage.
<p>
The code is not supposed to predict the <code>1</code> and <code>-1</code> values; it is supposed to get zero or a value lesser or greater than zero.
</p>
<p>
Beware! The behavior may change if you implement a custom comparator!
</p>
<p>
To apply the clean up, select <b>Compare to zero</b> check box on the <b>Source Fixing</b> tab in your clean up profile.
</p>
<p><img src="images/comparison-zero-preferences.png" alt="Preferences" width="800"/></p>
<p>
For the given code:
</p>
<p><img src="images/comparison-zero-before.png" alt="Before"/></p>
<p>
One gets:
</p>
<p><img src="images/comparison-zero-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>
<tr id="parallel-index-search"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=567521 -->
<td class="title"><a href="#parallel-index-search">Parallel index search</a></td>
<td class="content">
A new preference option has been added and enabled by default:
<b>Preferences &gt; Java &gt; Enable parallel index search</b>.
Depending on the available hardware, this option should improve performance
for all index based Java search operations, but could also lead to possible regressions.
To switch back to the old sequential index search, turn this option off:
<p>
<img src="images/parallel-index-search.png" alt="" />
</p>
</td>
</tr>
<tr id="restricted-identifier-preference"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569759 -->
<td class="title"><a href="#restricted-identifier-preference">Coloring restricted identifiers</a></td>
<td class="content">
A new option named <b>Restricted identifiers</b> has been added under Java category in <b>Java &gt; Editor &gt; Syntax Coloring</b> preferences.
<p>
Some identifiers (e.g. var, yield, record etc.) are restricted identifiers because they are not allowed in some contexts.
Semantic highlighting options for such identifiers can be controlled by the element <b>Restricted identifiers</b>
under <b>Java</b> category in <b>Java &gt; Editor &gt; Syntax Coloring</b> preference page.
</p>
<p><img src="images/restricted-identifier-preference.png" alt=""/></p>
</td>
</tr>
<tr id="annotate-for-source-folders"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=509397 -->
<td class="title"><a href="#annotate-for-source-folders">Externally annotate sources</a></td>
<td class="content">
The concept of external null annotations has been extended to apply to source folders, too.
<p>
<a href="https://www.eclipse.org/eclipse/news/4.5/jdt.php#external-annotations" target="_blank">External annotations</a> were introduced in Eclipse 4.5
in order to overlay not-editable library classes with null annotations to specify the null contract
against which library calls should be analysed.
You can now apply the same concept for another kind of classes that should not be edited: generated source code.
</p>
<p>
In the <b>Java Build Path</b> dialog, also source folders now have a node <b>External annotations</b>
where a path to Eclipse External Annotation files (.eea) can be configured.
</p>
<p><img src="images/annotate-sources-config.png" alt="Configure Annotation Path"/></p>
<p>
Given a project that is configured for annotation based null analysis, and given a Java class
inside a source folder configured for external annotations, the editor now offers a quick assist (<b>Ctrl+1</b>)
for annotating individual type references in the signatures of methods and fields.
</p>
<p><img src="images/annotate-sources-assist.png" alt="Configure Annotation Path"/></p>
<p>
The selected option will record that the return type should be interpreted as <code>@NonNull List&lt;Attribute&gt;</code>
(the popup to the right showing the internal format how this annotation will be stored in an .eea file).
With this annotation in place, the annotated signature will be shown in hovers and will be used for null analysis:
</p>
<p><img src="images/annotate-sources-effect.png" alt="Configure Annotation Path"/></p>
</td>
</tr>
<tr id="mockito-static-imports"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=562639 -->
<td class="title"><a href="#mockito-static-imports">static import org.mockito.Mockito.* available as favorite</a></td>
<td class="content">
Imports for static <code>org.mockito.Mockito.*</code> are added to the Java favorites in the preferences under <b>Java &gt; Editor &gt; Content Assists &gt; Favorites</b>.
This way the organize imports action in the IDE will automatically add static imports to this class when you use the Mockito library in your tests.
</td>
</tr>
<!-- ******************* End of Java Views and Dialogs ************************************* -->
<!-- ******************* Java Compiler ************************************* -->
<!-- ******************* End of Java Compiler ************************************* -->
<!-- ******************* Java Formatter ************************************* -->
<!-- ******************* End of Java Formatter ************************************* -->
<!-- *********************** Debug ******************************** -->
<tr>
<td id="Debug" class="section" colspan="2">
<h2>Debug</h2>
</td>
</tr>
<tr id="toggle-tracepoints"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569135 -->
<td class="title"><a href="#toggle-tracepoints">Toggle tracepoints in editor ruler</a></td>
<td class="content">
A new <b>Toggle Tracepoint</b> context-menu entry has been added to the <b>Java Editor</b> line ruler.
Both the <b>Toggle Tracepoint</b> options i.e. the new context-menu entry and the existing option under <b>Run</b> menu have a new icon
and are now available for Java class files also along with Java source files.
<p>
<img src="images/toggle-tracepoints.png" alt="screenshot showing new menu" />
</p>
</td>
</tr>
<tr id="toggle-breakpoints-works-onlistwithabstract"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=563208 -->
<td class="title"><a href="#toggle-breakpoints-works-listofmethods-including-abstract">Toggle breakpoint on a list of methods including abstract method</a></td>
<td class="content">
You can now <b>Toggle Method Breakpoint</b> on a list of methods which includes an abstract method.
<p>
<img src="images/debug-toggle-breakpoint.png" alt="screenshot showing enabled Toggle breakpoint" />
</p>
</td>
</tr>
<!--************************ End of Debug ******************************** -->
<!-- *********************** JDT Developers ******************************** -->
<!-- *********************** End of JDT Developers ******************************** -->
</tbody>
</table>
<!-- ****************** END OF N&N TABLE ****************** -->
</body>
</html>