blob: 9c45c37dab6d3b3178fd204e6d45c028028b6679 [file] [log] [blame]
* Copyright (c) 2015, 2016 Eclipse Foundation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* Contributors:
* Eric Poirier (Eclipse Foundation) - Initial implementation
* Christopher Guindon (Eclipse Foundation)
// This file must be included
if(basename(__FILE__) == basename($_SERVER['PHP_SELF'])){exit();}
<h1 class="article-title"><?php echo $pageTitle; ?></h1>
<p>It's been "almost" a year since our last <a target="_blank" href="">article</a> for the Eclipse Newsletter, and a lot has happened in the project since. In this article, we'll cover some of the highlights of the past releases and the impact the project had on the Java ecosystem.</p>
<h1 id="improvementsallovertheplace">Improvements all over the place!</h1>
<p>Over the past 10 months, received a fair share of bug fixes and some notable improvements, including, among other things:</p>
<li>smaller distribution size,</li>
<li>faster start times,</li>
<li>improved diagnostics performance,</li>
<li>new Java 9 support,</li>
<li>improvements to the "organize imports" refactoring (with favorite imports, imports order, execute on save),</li>
<li>code actions galore (known as quick-fixes in Eclipse IDE land),</li>
<li>the ability to disable autobuilds, or trigger incremental or full builds on demand,</li>
<li>proper test classpath isolation (i.e. test classes don't leak into main code anymore),</li>
<li>improved symbol (a.k.a. Type) search,</li>
<li>new multi-root support,</li>
<li>partial rename refactoring support (still missing file rename)</li>
<li>support for 3rd party extensions (debugger, decompilers, new commands),</li>
<p>For some of those fixes and improvements, leverages the latest milestone developments from the Eclipse Photon SDK.</p>
<h1 id="jdtlsintegratedeverywhere"> integrated everywhere</h1>
<p>While <a target="_blank" href="">vscode-java</a> is the reference implementation for clients, others have jumped on the train, like the <a target="_blank" href="">ide-java extension</a> for the Atom editor:</p>
<p align="center"><a target="_blank" href="/community/eclipse_newsletter/2018/march/images/atom_extension.png"><img class="img-responsive" src="/community/eclipse_newsletter/2018/march/images/atom_extension_sm.png" alt="Atom with ide-java extension"></a></p>
<p>or <a target="_blank" href="">YCMD</a>, providing autocompletion in <a target="_blank" href="">VIM</a>:</p>
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="" frameborder="0" allowfullscreen></iframe>
<h1 id="aflourishingecosystem">A flourishing ecosystem</h1>
<p>As we're seeing being used more and more across the LSP client landscape, we've inevitably received many requests to allow 3rd party extensions to integrate deeply with </p>
<p>Because the server is based on the OSGi framework powering the Eclipse IDE, we could open the gates to allow external extensions, fairly easily. During the <code>initialize</code> request, clients must provide the <code>bundles</code> parameter, which lists the full path of all OSGi bundles needed to be started by :</p>
<pre style="background:#fff;color:#000"><span style="color:#ff7800">interface</span> <span style="color:#3b5bb5">InitializationOptions</span> {
<span style="color:#8c868f">/**
* a list of Java LS extensions
bundles<span style="color:#ff7800">?</span><span style="color:#ff7800">:</span> string[];
<span style="color:#8c868f">/**
* a list of workspace folders
workspaceFolders<span style="color:#ff7800">?</span><span style="color:#ff7800">:</span> <span style="color:#ff7800">WorkspaceFolder</span>[];
<span style="color:#8c868f">/**
* Java LS configuration settings
settings<span style="color:#ff7800">?</span><span style="color:#ff7800">:</span> <span style="color:#ff7800">JavaConfigurationSettings</span>[];
<p>In order to contribute commands, bundles need to provide a extension point <code></code> in their plugin.xml, with a list of command ids, like :</p>
<pre style="background:#fff;color:#000">&lt;plugin>
&lt;extension point<span style="color:#ff7800">=</span><span style="color:#409b1c">""</span>>
&lt;delegateCommandHandler class<span style="color:#ff7800">=</span><span style="color:#409b1c">""</span>>
&lt;command id<span style="color:#ff7800">=</span><span style="color:#409b1c">""</span><span style="color:#ff7800">/</span>>
&lt;command id<span style="color:#ff7800">=</span><span style="color:#409b1c">""</span><span style="color:#ff7800">/</span>>
&lt;command id<span style="color:#ff7800">=</span><span style="color:#409b1c">""</span><span style="color:#ff7800">/</span>>
&lt;command id<span style="color:#ff7800">=</span><span style="color:#409b1c">""</span><span style="color:#ff7800">/</span>>
&lt;command id<span style="color:#ff7800">=</span><span style="color:#409b1c">""</span><span style="color:#ff7800">/</span>>
&lt;command id<span style="color:#ff7800">=</span><span style="color:#409b1c">""</span><span style="color:#ff7800">/</span>>
&lt;<span style="color:#ff7800">/</span>delegateCommandHandler>
&lt;<span style="color:#ff7800">/</span>extension>
&lt;<span style="color:#ff7800">/</span>plugin>
<p>This mechanism allowed the Microsoft team to implement a complete <a target="_blank" href="">Java debugger extension for VS Code</a>:</p>
<p align="center"><a target="_blank" href="/community/eclipse_newsletter/2018/march/images/vscode_debugger.png"><img class="img-responsive" src="/community/eclipse_newsletter/2018/march/images/vscode_debugger_sm.png" alt="VS Code Java debugger in action"></a></p>
<p>... and a <a target="_blank" href="">Java Test runner</a></p>
<p align="center"><a target="_blank" href="/community/eclipse_newsletter/2018/march/images/vscode_test.png"><img class="img-responsive" src="/community/eclipse_newsletter/2018/march/images/vscode_test_sm.png" alt="VS Code Java Test Runner"></a></p>
<p><a target="_blank" href="">Eclipse Che</a>, currently in the process of replacing its own Java language server with, should reach feature parity with its old server by providing custom extensions, for instance dependency visualization:</p>
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="" frameborder="0" allowfullscreen></iframe>
<p><a target="_blank" href="">David Gileadi</a> added support for <a target="_blank" href="">external decompilers implementations</a> by implementing the <code></code> <a target="_blank" href="">extension point</a>. A <a target="_blank" href="">VSCode extension</a> is available, but the bundles can be embedded in any client.</p>
<p>Finally, <a target="_blank" href="">Gorkem Ercan</a>, fearless leader of the project, can satisfy his dogfooding needs by developing with in VS Code: his <a target="_blank" href="">vscode-pde</a> extension allows the development of Eclipse Plugins by loading a target platform file, referenced in a <a target="_blank" href="">javaConfig.json</a> file.
The <a target="_blank" href=""></a> extension point allows 3rd party adopters to expand the types of projects imported by beyond simply Maven, Gradle and Eclipse projects. </p>
<h1 id="whatsnext">What's next?</h1>
<p>The team tries to keep a 2-weeks release cadence, making each release incrementally superior to the last. We're collaborating with the LSP4J and the Microsoft teams to keep improving the Language Server Protocol, so, in the near future, we'll hopefully be able to provide :</p>
<li>full renaming support (including moving files),</li>
<li>more refactorings / code actions</li>
<li><code>textDocument/onTypeFormatting</code> support, to automatically format your code after typing <code>;</code> or when going to the next line,</li>
<li>provide a progress report API, allowing clients to track background activity</li>
<li>provide a notification API to broadcast classpath changes</li>
<li>Java 10 support</li>
<li>squash more bugs</li>
<p>All contributions are welcome, so feel free to chime in the <a target="_blank" href=""> channel on Mattermost</a>, or open bug reports (and submit pull requests!) to <a target="_blank" href=""></a></p>
<div class="bottomitem">
<h3>About the Author</h3>
<div class="row">
<div class="col-sm-12">
<div class="row">
<div class="col-sm-8">
<img class="img-responsive"
alt="Fred Bricon" />
<div class="col-sm-16">
<p class="author-name">
Fred Bricon<br />
<a target="_blank" href="">Red Hat</a>
<ul class="author-link list-inline">
<li><a class="btn btn-small btn-warning" target="_blank" href="">Twitter</a></li>
<li><a class="btn btn-small btn-warning" target="_blank" href="">GitHub</a></li>
<?php echo $og; ?>