Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
added lsp to features
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
  • Loading branch information
sjsf committed Sep 25, 2017
1 parent eed3f62 commit b19978a
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 20 deletions.
17 changes: 1 addition & 16 deletions bundles/model/org.eclipse.smarthome.model.lsp/about.html
@@ -1,4 +1,3 @@

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Expand All @@ -9,7 +8,7 @@
<body lang="EN-US">
<h2>About This Content</h2>

<p>&lt;<em>September 15, 2014</em>&gt;</p>
<p>June 5, 2006</p>
<h3>License</h3>

<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
Expand All @@ -25,19 +24,5 @@ <h3>License</h3>
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>


<h3>Third Party Content</h3>
<p>The Content includes items that have been sourced from third parties as set out below. If you
did not receive this Content directly from the Eclipse Foundation, the following is provided
for informational purposes only, and you should look to the Redistributor's license for
terms and conditions of use.</p>
<p>
<strong>Joda-Time 2.3</strong> <br/><br/>
This bundle includes the <a href="http://www.joda.org/joda-time/">Joda-Time library</a>. The sources can be found at
<a href="https://github.com/JodaOrg/joda-time/tree/v2.3">Sourgeforge</a> and
they are made available under the <a href="about_files/LICENSE-2.0.txt">Apache 2.0 license</a>.
</p>


</body>
</html>
Expand Up @@ -2,4 +2,5 @@ source.. = src/main/java/
output.. = target/classes/
bin.includes = META-INF/,\
.,\
OSGI-INF/
OSGI-INF/,\
about.html
Expand Up @@ -59,7 +59,7 @@ public void deactivate() {
private void listen() {
try {
socket = new ServerSocket(PORT);
logger.info("Language Server running on port {}", PORT);
logger.info("Language Server started on port {}", PORT);
while (!socket.isClosed()) {
logger.debug("Going to wait for a client to connect");
try {
Expand All @@ -79,7 +79,6 @@ private void listen() {
private void handleConnection(final Socket client) {
logger.debug("Client {} connected", client.getRemoteSocketAddress());
try {

LanguageServerImpl languageServer = Guice.createInjector(new RuntimeServerModule())
.getInstance(LanguageServerImpl.class);

Expand All @@ -89,7 +88,7 @@ private void handleConnection(final Socket client) {
Future<?> future = launcher.startListening();
future.get();
} catch (IOException e) {
logger.error("Error communicating with the LSP client", e);
logger.warn("Error communicating with the LSP client");
} catch (InterruptedException e) {
// go on, let the thread finish
} catch (ExecutionException e) {
Expand Down
42 changes: 42 additions & 0 deletions features/karaf/esh-core/src/main/feature/feature.xml
Expand Up @@ -298,6 +298,11 @@
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.item.runtime/${project.version}</bundle>
</feature>

<feature name="esh-model-item-ide" version="${project.version}">
<feature>esh-model-item</feature>
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.item.ide/${project.version}</bundle>
</feature>

<feature name="esh-model-persistence" version="${project.version}">
<feature>esh-base</feature>
<feature>esh-model-item</feature>
Expand All @@ -310,6 +315,11 @@
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.persistence.runtime/${project.version}</bundle>
</feature>

<feature name="esh-model-persistence-ide" version="${project.version}">
<feature>esh-model-persistence</feature>
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.persistence.ide/${project.version}</bundle>
</feature>

<feature name="esh-model-rule" version="${project.version}">
<feature>esh-base</feature>
<feature>esh-model-item</feature>
Expand All @@ -324,6 +334,11 @@
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.rule.runtime/${project.version}</bundle>
</feature>

<feature name="esh-model-rule-ide" version="${project.version}">
<feature>esh-model-rule</feature>
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.rule.ide/${project.version}</bundle>
</feature>

<feature name="esh-model-script" version="${project.version}">
<feature>esh-base</feature>
<feature>esh-model-persistence</feature>
Expand All @@ -336,6 +351,11 @@
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.script.runtime/${project.version}</bundle>
</feature>

<feature name="esh-model-script-ide" version="${project.version}">
<feature>esh-model-script</feature>
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.script.ide/${project.version}</bundle>
</feature>

<feature name="esh-model-sitemap" version="${project.version}">
<feature>esh-base</feature>
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.sitemap/${project.version}</bundle>
Expand All @@ -347,6 +367,11 @@
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.sitemap.runtime/${project.version}</bundle>
</feature>

<feature name="esh-model-sitemap-ide" version="${project.version}">
<feature>esh-model-sitemap</feature>
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.sitemap.ide/${project.version}</bundle>
</feature>

<feature name="esh-model-thing" version="${project.version}">
<feature>esh-base</feature>
<feature>esh-model-item</feature>
Expand All @@ -359,6 +384,23 @@
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.thing.runtime/${project.version}</bundle>
</feature>

<feature name="esh-model-thing-ide" version="${project.version}">
<feature>esh-model-thing</feature>
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.thing.ide/${project.version}</bundle>
</feature>

<feature name="esh-model-lsp" version="${project.version}">
<requirement>esh.tp;filter:="(&amp;(feature=xtext-ide)(version&gt;=2.12.0)(!(version&gt;=2.13.0)))"</requirement>
<requirement>esh.tp;filter:="(&amp;(feature=lsp4j)(version&gt;=0.2.0)(!(version&gt;=0.3.0)))"</requirement>
<feature>esh-model-item-ide</feature>
<feature>esh-model-persistence-ide</feature>
<feature>esh-model-rule-ide</feature>
<feature>esh-model-script-ide</feature>
<feature>esh-model-sitemap-ide</feature>
<feature>esh-model-thing-ide</feature>
<bundle>mvn:org.eclipse.smarthome.model/org.eclipse.smarthome.model.lsp/${project.version}</bundle>
</feature>

<feature name="esh-storage-mapdb" version="${project.version}">
<feature>esh-base</feature>
<bundle>mvn:org.eclipse.smarthome.storage/org.eclipse.smarthome.storage.mapdb/${project.version}</bundle>
Expand Down
18 changes: 18 additions & 0 deletions features/karaf/esh-tp/src/main/feature/feature.xml
Expand Up @@ -24,6 +24,7 @@
<feature dependency="true">esh-tp-jmdns</feature>
<feature dependency="true">esh-tp-paho</feature>
<feature dependency="true">esh-tp-xtext</feature>
<feature dependency="true">esh-tp-xtext-ide</feature>

<bundle dependency="true">mvn:com.google.code.gson/gson/2.3.1</bundle>
<bundle dependency="true">mvn:io.swagger/swagger-annotations/1.5.5</bundle>
Expand Down Expand Up @@ -203,4 +204,21 @@
<bundle dependency="true" start-level="20">mvn:org.ow2.asm/asm-all/5.0.2</bundle>
</feature>

<feature name="esh-tp-xtext-ide" description="Xtext - IDE Support" version="${project.version}">
<capability>esh.tp;feature=xtext-ide;version=2.12.0</capability>
<feature dependency="true">esh-tp-xtext</feature>

<!-- Support for the Language Server Protocol -->
<bundle dependency="true">mvn:de.maggu2810.thirdparty.org.eclipse.xtext/org.eclipse.xtext.ide/2.12.0.sp1</bundle>
<bundle dependency="true">mvn:org.eclipse.xtext/org.eclipse.xtext.xbase.ide/2.12.0</bundle>
</feature>

<feature name="esh-tp-lsp4j" description="Eclipse LSP4J" version="${project.version}">
<capability>esh.tp;feature=lsp4j;version=0.2.1</capability>

<bundle dependency="true">mvn:org.eclipse.lsp4j/org.eclipse.lsp4j/0.2.1</bundle>
<bundle dependency="true">mvn:org.eclipse.lsp4j/org.eclipse.lsp4j.jsonrpc/0.2.1</bundle>
</feature>


</features>
Expand Up @@ -164,4 +164,11 @@ Model Support.
version="0.0.0"
unpack="false"/>

<plugin
id="org.eclipse.smarthome.model.lsp"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>

</feature>

0 comments on commit b19978a

Please sign in to comment.