Conversation
@kubawolanin would you mind having a look? My VSCode with openhab/openhab-vscode#31 (unchanged) connects successfully and also gets some validation complaints successfully from the server: I'm not so sure though about the "content assist" completion proposals: they look exactly the same as before, but I'm not sure whether this is a flaw on runtime-side or if that's actually expected. |
Wow @SJKA this looks awesome! 😮
Current Completion provider gets a list of Item's completions directly from the REST response, see this file and the ItemsModel class. Can't emphasize enough how cool it is, man! 😎 |
Hey @SJKA, I'm trying to build your branch but there are tests that are failing:
Click to expand build log for `mvn clean install` in `/smarthome/` directory
Any idea what I'm doing wrong? ;-) |
@kubawolanin I have these failing tests when doing local builds on my Mac also from time to time. Best if you simply use a |
Thanks @kaikreuzer for [the info](eclipse-archived#4148 (comment))! :-) Signed-off-by: Kuba Wolanin <hi@kubawolanin.com> (github: kubawolanin)
FTR: I didn't update the (karaf) features yet - this time by intention because of eclipse/xtext-core#446 |
Thanks @kaikreuzer for [the info](#4148 (comment))! :-) Signed-off-by: kubawolanin <hi@kubawolanin.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase this branch and add the new bundle to the p2 feature as well as to the Karaf feature - thanks!
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/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Err, did you maybe choose a bad about.html to copy in here...?
private void listen() { | ||
try { | ||
socket = new ServerSocket(PORT); | ||
logger.info("Language Server running on port {}", PORT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better "started" instead of "running"?
private void handleConnection(final Socket client) { | ||
logger.debug("Client {} connected", client.getRemoteSocketAddress()); | ||
try { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty line
Future<?> future = launcher.startListening(); | ||
future.get(); | ||
} catch (IOException e) { | ||
logger.error("Error communicating with the LSP client", e); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely an "external" issue like a client that closes the connection. If we want to log it at all, we at least should not include the stacktrace here as it is no bug on our end.
targetplatform/smarthome.target
Outdated
@@ -101,6 +101,10 @@ | |||
<repository location="http://download.eclipse.org/modeling/emf/emf/updates/2.11/core/R201506010402"/> | |||
</location> | |||
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit"> | |||
<unit id="org.eclipse.lsp4j.sdk.feature.group" version="0.2.0.v20170518-0647"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an incubation project? If so, we might require a CQ for it, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The due diligence process allows "Re-Use of Eclipse Project or Plug-in (Orbit excluded) or bundle that has undergone a release review". It doesn't say anything about incubation status of Eclipse projects. LSP4J has been formally released.
Did I miss anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then we are lucky (and I had something wrong in mind... reminder to self: incubation!=unreleased).
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
b19978a
to
45ba3b5
Compare
@@ -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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a message or a client reference might be helpful, though, don't you think?
7e595ce
to
f5b94a1
Compare
I have updated the Karaf packaging to a state where it "builds on my machine". I hope that Travis comes to the same conclusion. Dear Karaf packaging experts, please have a close look if you can make some sense of my copy'n'paste in the |
@@ -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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add also the lsp4j ESH TP feature.
|
||
<feature name="esh-model-lsp" version="${project.version}"> | ||
<requirement>esh.tp;filter:="(&(feature=xtext-ide)(version>=2.12.0)(!(version>=2.13.0)))"</requirement> | ||
<feature dependency="true">esh-tp-lsp4j</feature> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rely on esh-tp features using "requirement" and a filter expression as you have done in the line above for xtext-ide
(first add your lsp4j optional feature dependency to the tp).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, I coudln't get the "requirement" statement to work - it seems like your above hint was the missing piece. THANKS!
Will do so, of course...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some background: Every solution could create its own target platform feature definition.
The esh-base feature depends on the esh-tp feature.
All features that are part of esh-tp are using dependency="true"
so they are only considered if someone depends on it.
We are using the requirement declaration so we state which esh targetplafrom feature is necessary...
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
Travis seems to have problems this afternoon, it isn't at all starting the builds. |
This is a first shot on the Language Server support so that we can jointly work on it.
The new bundle
o.e.sh.model.lsp
exposes a Language Server on (currently fixed) port 5007.relates to openhab/openhab-vscode#31
fixes #3898
Signed-off-by: Simon Kaufmann simon.kfm@googlemail.com