| <!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.14 - New and Noteworthy</title> |
| </head> |
| |
| <body> |
| <h2>Java development tools</h2> |
| <ul> |
| <li><a href="#Java13">Java™ 13 Support</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="#JUnit">JUnit</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 13 Support ************************************* --> |
| <tr> |
| <td id="Java13" class="section" colspan="2"> |
| <h2>Java™ 13 Support </h2></td> |
| </tr> |
| |
| <tr id="Java_13"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=539066 --> |
| <td class="title">Java™ 13</td> |
| <td class="content"> |
| <a href="https://jdk.java.net/13/">Java™ 13</a> is available and Eclipse JDT supports Java 13 for the Eclipse 4.14 release. |
| <p> |
| The release notably includes the following Java 13 features: |
| <br/> |
| <a href="https://openjdk.java.net/jeps/354"> JEP 354: Switch Expressions (Preview)</a>. |
| <br/> |
| <a href="https://openjdk.java.net/jeps/355"> JEP 355: Text Blocks (Preview)</a>. |
| </p> |
| <p> |
| Please note that these are <a href="https://openjdk.java.net/projects/jdk/13/"> preview language features</a> |
| and hence enable preview option should be on. |
| For an informal introduction of the support, |
| please refer to <a href="https://wiki.eclipse.org/Java13/Examples"> Java 13 Examples wiki</a>. |
| </p> |
| </td> |
| </tr> |
| |
| <tr id="Text_Block_Creation_Keyboard_ShortCut"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=550113 --> |
| <td class="title">Keyboard shortcut for Text Block creation</td> |
| <td class="content"> |
| A keyboard shortcut <b>Ctrl + Shift + ' </b>is added in the Java Editor for <b>text blocks</b>, which is a preview feature |
| added in Java 13. |
| <p> |
| Conditions under which this keyboard shortcut works are: |
| </p> |
| <ul> |
| <li>The Java Project should have a compliance of 13 or above and the preview features should be enabled.</li> |
| <li>The selection in the editor should not be part of a string or a comment or a text block.</li> |
| </ul> |
| <p> Examples: </p> |
| <p><img src="images/textblock-pre-creation1.png" alt=""/></p> |
| Pressing the shortcut gives: |
| <p><img src="images/textblock-post-creation1.png" alt=""/></p> |
| <p> You can also encompass a selected text in text block as below:</p> |
| <p><img src="images/textblock-pre-creation2.png" alt=""/></p> |
| On pressing the shortcut, you get this: |
| <p><img src="images/textblock-post-creation2.png" alt=""/></p> |
| </td> |
| </tr> |
| <!-- ******************* End of Java 13 Support ************************************* --> |
| |
| <!-- ******************* Java Editor ************************************* --> |
| <tr> |
| <td id="JavaEditor" class="section" colspan="2"> |
| <h2>Java Editor </h2> |
| </td> |
| </tr> |
| |
| <tr id="unnecessary-array-creation"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=550129 --> |
| <td class="title">Remove unnecessary array creation</td> |
| <td class="content"> |
| A new cleanup action <b>Remove unnecessary array creation</b> has been added. It will remove explicit array creation for <code>varargs</code> parameters. |
| <p><img src="images/unnecessary-array-creation-option.png" alt=""/></p> |
| For the given code: |
| <p><img src="images/unnecessary-array-creation-before.png" alt=""/></p> |
| After cleanup, you get this: |
| <p><img src="images/unnecessary-array-creation-after.png" alt=""/></p> |
| </td> |
| </tr> |
| |
| <tr id="push-down-negation"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=550913 --> |
| <td class="title">Push negation down in expression</td> |
| <td class="content"> |
| A new Java cleanup/save action <b>Push down negation</b> has been added. It reduces the double negation by reverting the arithmetic expressions. |
| <p> |
| For instance: |
| </p> |
| <p><code>!!isValid;</code> becomes <code>isValid;</code></p> |
| <p><code>!(a != b);</code> becomes <code>(a == b);</code></p> |
| <p><img src="images/push-down-negation.png" alt="Push negation down cleanup"/></p> |
| </td> |
| </tr> |
| |
| <tr id="templates-empty-java-file"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=505610 --> |
| <td class="title">Provide templates for empty Java source files</td> |
| <td class="content"> |
| When dealing with empty Java source files, some basic templates (class, interface, enum) will now be available from the content assist popup. |
| <p><img src="images/templates-empty-java-file.png" alt=""/></p> |
| </td> |
| </tr> |
| |
| <tr id="postfix-completion"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=458804 --> |
| <td class="title">Postfix completion proposal category</td> |
| <td class="content"> |
| Postfix completion allows certain kinds of language constructs to be applied to the previously entered text. |
| <p>For example: Entering <code>"input text".var</code> and selecting the <b>var - Creates a new variable</b> proposal, will result in <code>String name = "input text"</code>.</p> |
| <p><img src="images/postfix-completion.png" alt=""/></p> |
| </td> |
| </tr> |
| |
| <tr id="try-with-resources"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=473276 --> |
| <td class="title">try-with-resources quickfix</td> |
| <td class="content"> |
| A <b>quickfix</b> has been added to create a <code>try-with-resources</code> statement based on the selected lines. Lines that are selected |
| must start with declarations of objects that implement <code>AutoCloseable</code>. These declarations are added as |
| the resources of the <code>try-with-resources</code> statement. |
| <p> |
| If there are selected statements that are not eligible resources (such as Objects that don't implement <code>AutoCloseable</code>), |
| then the first such statement and all the following selected statements will be placed in the <code>try-with-resources</code> body. |
| </p> |
| Method before applying try-with-resources: |
| <p><img src="images/tryWithResource1.png" alt=""/></p> |
| Select all the lines inside the method, then use the short-cut <b>Ctrl+1</b> and click on <b>Surround with try-with-resources</b> from the list: |
| <p><img src="images/tryWithResource2.png" alt=""/></p> |
| This results in: |
| <p><img src="images/tryWithResource3.png" alt=""/></p> |
| </td> |
| </tr> |
| |
| <tr id="module-javadoc-checking"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=549855 --> |
| <td class="title">Javadoc tag checking for modules</td> |
| <td class="content"> |
| Support has been added to check the Javadoc of a module-info.java file to report |
| missing and duplicate <code>@uses</code> and <code>@provides</code> tags depending on |
| the compiler settings (<b>Preferences > Java > Compiler > Javadoc</b>). |
| <p><img src="images/checkModuleJavadoc.png" alt=""/></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> |
| |
| <tr id="formatter-text-block"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=551984 --> |
| <td class="title">Formatting of text blocks</td> |
| <td class="content"> |
| The code formatter can now handle <b>text blocks</b>, which is a preview feature added in Java 13. |
| It's controlled by the <b>Text block indentation</b> setting, found right in the <b>Indentation</b> section of the <b>Profile Editor</b> (<b>Preferences > Java > Code Style > Formatter > Edit...</b>). |
| <p>By default, text block lines are indented the same way as wrapped code lines, that is with two extra tabs relative |
| to the starting indentation (or whatever is set as <b>Default indentation for wrapped lines</b> in the <b>Line Wrapping</b> section). |
| You can also set it to use only one tab for indentation (<b>Indent by one</b>), align all lines to the position of the opening quotes |
| (<b>Indent on column</b>), or preserve the original formatting (<b>Do not touch</b>). |
| </p> |
| <p><img src="images/formatter-text-block.png" alt=""/></p> |
| </td> |
| </tr> |
| |
| <tr id="formatter-javadoc-tags-blank-lines"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=54627 --> |
| <td class="title">Blank lines between Javadoc tags</td> |
| <td class="content"> |
| The code formatter can now divide Javadoc tags into groups (by type, for example <code>@param</code>, <code>@throws</code>, <code>@returns</code>) and separate these groups with blank lines. |
| This feature can be turned on in the <b>Comments > Javadocs</b> section by checking the <b>Blank lines between tags of different type</b> box. |
| <p><img src="images/formatter-javadoc-tags-blank-lines.png" alt=""/></p> |
| </td> |
| </tr> |
| |
| <tr id="formatter-space-before-not"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=552919 --> |
| <td class="title">Space after not operator</td> |
| <td class="content"> |
| A new setting has been added to control whether a space should be added <b>after not (<code>!</code>) operator</b>, independently from other unary operators. |
| To find it, expand sections <b>Whitespace > Expressions > Unary operators</b> and go to the last checkbox. |
| <p><img src="images/formatter-space-after-not.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-runtime-bree"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=551728 --> |
| <td class="title">BREE update for org.eclipse.jdt.junit.runtime</td> |
| <td class="content"> |
| The Bundle Required Execution Environment (BREE) for the <code>org.eclipse.jdt.junit.runtime</code> bundle is now J2SE-1.5. |
| </td> |
| </tr> |
| <!-- ******************* End of JUnit ************************************* --> |
| |
| <!-- *********************** Debug ******************************** --> |
| <tr> |
| <td id="Debug" class="section" colspan="2"> |
| <h2>Debug</h2> |
| </td> |
| </tr> |
| |
| <tr id="exception-instance-recurrence"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=284158 --> |
| <td class="title">No suspending on exception recurrence</td> |
| <td class="content"> |
| A new workspace preference has been added for exception breakpoints: <b>Suspend policy for recurring exception instances</b> controls |
| whether the same exception <em>instance</em> may cause the debugger to suspend more than once. |
| <p><img src="images/preference-exception-recurrence.png" alt="Preferences: Java > Debug"/></p> |
| <p>This option is relevant when debugging an application that has <code>try</code> blocks at several levels of the architecture. |
| In this situation an exception breakpoint may fire multiple times for the same actual exception <em>instance</em>: |
| A <code>throw</code> statement inside a <code>catch</code> block may re-throw the same exception. |
| The same holds for each <code>finally</code> block or <code>try-with-resources</code> block. |
| </p> |
| <p>When the debugger stops due to an exception breakpoint, you may want to continue your debug session by pressing |
| <b>Resume</b> (<b>F8</b>), but all that catching and re-throwing will force you to observe |
| all locations where the same exception will surface again and again. Suspending at all <code>try</code> blocks |
| on the call stack may also spoil your context of open Java editors, by opening more editors of classes that are |
| likely irrelevant for the debugging task at hand.</p> |
| <p>The <b>JDT Debugger</b> will now detect this situation, and the first time it notices the same exception instance |
| recurring at the surface, a new question dialog is shown: |
| </p> |
| <p><img src="images/dialog-exception-recurrence.png" alt="Dialog: Repeated exception occurrence"/></p> |
| <p>If you select <b>Skip</b> in this dialog, the current exception instance will be dismissed for good. |
| Still, new instances of the same exception type will cause suspending when they are thrown. |
| </p> |
| <p>If you check <b>Remember my decision</b> your choice will be stored in the mentioned workspace preference |
| to be effective for all exception breakpoints. |
| </p> |
| <p>Even after choosing <b>Skip</b> — resp. <b>Only once</b> in the preferences — you can have the old behavior |
| simply by pressing <b>Step Return</b> (<b>F7</b>) instead of <b>Resume</b>.</p> |
| </td> |
| </tr> |
| |
| <!--************************ End of Debug ******************************** --> |
| |
| <!-- *********************** JDT Developers ******************************** --> |
| <tr> |
| <td id="JDTDev" class="section" colspan="2"> |
| <h2>JDT Developers</h2> |
| </td> |
| </tr> |
| |
| <tr id="completion-ext-flag-uithread"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=538630 --> |
| <td class="title">Flag whether content assist extension needs to run in UI thread</td> |
| <td class="content"> |
| The existing <code>org.eclipse.jdt.ui.javaCompletionProposalComputer</code>, <code>org.eclipse.jdt.ui.javadocCompletionProposalComputer</code> |
| and <code>org.eclipse.jdt.ui.javaCompletionProposalSorters</code> extension points now allow a new attribute <b>requiresUIThread</b> that allows |
| a developer to declare whether running in the UI thread is required or not. |
| <p> |
| This information will be used by the <b>Content Assist</b> operation to allow some optimizations and prevent UI freezes by reducing the amount of |
| work happening in the UI thread. |
| </p> |
| <p> |
| To preserve backward compatibility, the default value for this attribute (if unset) is <code>true</code>, meaning the extension is expected to |
| run in the UI thread. |
| </p> |
| </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> |