| <!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>Platform and Equinox API</h2> |
| <ul> |
| <li><a href="#Platform">Platform Changes</a></li> |
| <li><a href="#SWT">SWT Changes</a></li> |
| </ul> |
| |
| <!-- ****************** START OF N&N TABLE****************** --> |
| <table class="news"> |
| <colgroup> |
| <col class="title" /> |
| <col /> |
| </colgroup> |
| <tbody> |
| <!-- ******************** Platform ********************** --> |
| <tr> |
| <td id="Platform" class="section" colspan="2"><h2>Platform Changes</h2></td> |
| </tr> |
| |
| <tr id="jetty-10-update"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=569804 --> |
| <td class="title">Embedded Jetty server updated to version 10.x</td> |
| <td class="content"> |
| Jetty Server used by Help system is updated to version 10.x. As this version requires Servlet API 4.x the opportunity is used to move to the new Jakarta Servlet name of the library. |
| Bundle symbolic name becomes jakarta.servlet-api from the old javax.servlet one. One of the Jetty bundles org.eclipse.jetty.continuation has been removed from Jetty 10 releases |
| thus it's no longer part of Eclipse Platform content too. |
| </td> |
| </tr> |
| |
| <tr id="register-model-fragment"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=571866 --> |
| <td class="title">Register Model Fragments via Manifest header</td> |
| <td class="content"> |
| It is now possible to register model fragments via the newly introduced Manifest Header <code>Model-Fragment</code>. This way it is not necessary to create a <i>plugin.xml</i> that contains |
| an extension to the extension point <code>org.eclipse.e4.workbench.model</code>. |
| <p> |
| To register a fragment via Manifest header, you can now simply an entry similar to the following snippet to the MANIFEST.MF of the contributing bundle: |
| </p> |
| <p> |
| <code>Model-Fragment: fragment.e4xmi;apply=always</code> |
| </p> |
| <p> |
| The <code>apply</code> attribute is optional and defaults to <code>always</code>. It can have the same values as specified in the extension point: |
| <ul> |
| <li>always: each time the application started potentially replacing existing model elements and loosing information stored</li> |
| <li>initial: only when coming from a none persistent state</li> |
| <li>notexists: only if the given element does not exist already in the model</li> |
| </ul> |
| </p> |
| </td> |
| </tr> |
| |
| <tr id="register-model-processor"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=571866 --> |
| <td class="title">Register Model Processor via DS</td> |
| <td class="content"> |
| It is now possible to register model processors as declarative service. The model processor needs to implement the service interface <code>IModelProcessorContribution</code> to get |
| registered. This way it is not necessary to create a <i>plugin.xml</i> that contains an extension to the extension point <code>org.eclipse.e4.workbench.model</code>. |
| |
| <p> |
| The model processor is registered via DS, the execution is triggered via the Eclipse injection mechanism. The processor execution at registration time needs to be placed in a method |
| annotated with <code>@Execute</code>. Additionally it is possible to add a method annotated with <code>@PreDestroy</code> which gives the opportunity to cleanup in case the bundle |
| that provides the model processor contribution is stopped. |
| </p> |
| <p> |
| <pre> |
| @Component |
| public class ExampleProcessorContribution implements IModelProcessorContribution { |
| |
| @Execute |
| public void execute() { |
| System.out.println("Processor executed"); |
| } |
| |
| @PreDestroy |
| public void preDestroy() { |
| System.out.println("Processor killed"); |
| } |
| } |
| </pre> |
| </p> |
| <p> |
| It is also possible to re-use existing model processor POJO implementations and register them via an <code>IModelProcessorContribution</code>. For this the method <code>getProcessorClass()</code> |
| needs to be overridden to return the class of the model processor POJO. In this case there is no support for handling the stopping of the contributing bundle. |
| </p> |
| <p> |
| <pre> |
| @Component |
| public class ExampleProcessorContribution implements IModelProcessorContribution { |
| |
| @Override |
| public Class<?> getProcessorClass() { |
| return ExampleProcessor.class; |
| } |
| } |
| </pre> |
| </p> |
| <p> |
| The <code>IModelProcessorContribution</code> supports two service properties for configuration: |
| <ul> |
| <li>beforefragment: specifies if the processor has to be invoked before model fragments are added. If not specified it defaults to <code>true</code>.</li> |
| <li>apply: defines in which case a processor is run. If not specified it defaults to <i>always</i>.<br> |
| Possible values are: |
| <ul> |
| <li>always: each time the application started</li> |
| <li>initial: only when coming from a none persistent state</li> |
| </ul> |
| </li> |
| </ul> |
| </p> |
| <p> |
| <pre> |
| @Component(property = { |
| IModelProcessorContribution.BEFORE_FRAGMENT_PROPERTY_PREFIX + "false", |
| IModelProcessorContribution.APPLY_PROPERTY_PREFIX + "initial" |
| }) |
| public class ExampleProcessorContribution implements IModelProcessorContribution { ... } |
| </pre> |
| </p> |
| <p> |
| You can also specify model elements that should be added to the context that is used to invoke the processor. This is necessary as the processor is invoked on application context level. |
| To specify such model elements you need to override the method <code>getModelElements()</code> |
| </p> |
| <p> |
| <pre> |
| @Component(property = { |
| IModelProcessorContribution.BEFORE_FRAGMENT_PROPERTY_PREFIX + "false" |
| }) |
| public class ExampleProcessorContribution implements IModelProcessorContribution { |
| |
| @Execute |
| public void execute(@Named("org.eclipse.example.partstack") MPartStack myTest) { |
| System.out.println("Processor executed: " + myTest.getElementId()); |
| } |
| |
| @Override |
| public List<ModelElement> getModelElements() { |
| return Arrays.asList(new ModelElement("org.eclipse.example.partstack")); |
| } |
| } |
| </pre> |
| </p> |
| </td> |
| </tr> |
| <!-- ******************** End of Platform ********************** --> |
| |
| <!-- *********************** SWT *********************** --> |
| <tr> |
| <td id="SWT" class="section" colspan="2"><h2>SWT Changes</h2></td> |
| </tr> |
| <!-- *********************** End of SWT *********************** --> |
| |
| <!-- ******************** Platform ********************** --> |
| <tr> |
| <td id="p2" class="section" colspan="2"><h2>p2 Changes</h2></td> |
| </tr> |
| |
| <tr id="pgp-signature-verification"> <!-- https://bugs.eclipse.org/bugs/show_bug.cgi?id=570907 --> |
| <td class="title">Verify PGP signatures during installation</td> |
| <td class="content"> |
| When installing some artifact with p2, and those artifacts have the <code>pgp.signatures</code> |
| property set, the signatures will be verified during installation and installation will fail if a signature |
| couldn't be verified. |
| <p>Reasons of failures would be: |
| <ul> |
| <li>Signature is not well formatted (it must be armoured PGP blocks) or is intrisically wrong (eg the |
| signature has been modified in a way that makes it totally invalid).</li> |
| <li>No public key was found that matches the signature. Public keys are expected to be provided as value of |
| the <code>pgp.publicKeys</code> property either on the artifact metadata or, usually better, on the artifact |
| repository, in armoured form.</li> |
| <li>The signature and a matching public key were found, but the verification process shows that the signature |
| is incorrect. This usually means the signature was meant for another artifact.</li> |
| </ul> |
| Each one of those reasons will make the build fail, as they are security threats. It is assumed that any |
| signed artifact can be successfully verified for all given signatures to continue installation. |
| </p> |
| </td> |
| </tr> |
| <!-- ******************** End of Platform ********************** --> |
| </tbody> |
| </table> |
| <!-- ****************** END OF N&N TABLE ****************** --> |
| |
| <script type="text/javascript" src="scripts.js"></script> |
| <p style="text-align:center"> |
| <a href="jdt.php">Previous</a> <a style="margin:1em" href=".">Up</a> <a href="pde.php">Next</a> |
| </p> |
| </body> |
| </html> |