Git Product home page Git Product logo

Comments (22)

cdietrich avatar cdietrich commented on August 24, 2024

No there is no documentation.
che language server is still in work so it works only with some hardcoding.
https://github.com/cdietrich/che/tree/xtext2

=> nothing you can use out of the box

from xtext-languageserver-example.

chetanladdha avatar chetanladdha commented on August 24, 2024

Thanks @cdietrich. Could you please provide more pointer on which kind of hardcoding?

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

see my last commits

cdietrich/che@d2b5b1a
cdietrich/che@8a7d85c
cdietrich/che@bc9b691

eclipse-che/che#3127

from xtext-languageserver-example.

chetanladdha avatar chetanladdha commented on August 24, 2024

Thank You @cdietrich. !!
Do you mean with hard coding, we can have Che and Xtext integration?
Does this Xtext version will generate language registrations to META-INF/services/* for Java Servers and ships with a main class to start a language server, so that I can register it with Che and start server?

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

i cannot follow you

  • xtext 2.11 has language server support and has a main class you can usew
  • you can use e.g. gradle shadow jar plugin to create a shadowjar or gradle application plugin to create a launch.bat/sh (the initial version of the repo did a showdowjar, the current uses a appplication launch bat/sh)
  • che support language servers
  • you add a plugin to che to associate a file extension with a way to launch a language server
  • you add a agent to che that sideloads (downloads) the language server (in my example it downloads the jar, in other cases it would download a zipped application) so that i can be started by the plugin
  • the che language server support currently has so bugs. this bugs prevent from xtext language server working. you can mitigate/patch/workaround some places in che code which makes them usable with your language server only and no others.

my che branch/fork contains everything to get the language server of this repo in the older version with a showdow jar running

from xtext-languageserver-example.

chetanladdha avatar chetanladdha commented on August 24, 2024

Thanks, it answers most of my questions. In above reply, I am still not clear with the second point. Why need to create shadow jar plugin, how it impacts?
Also, does this patch working with Color coding, Code assistance etc in Che for sample dsl ?

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

i still dont get your question. the language client (che/vscode) needs to start the server somehow. in java you can do this

java -jar myjar.jar // with myjar beeing a self contained full jar with main class in manifest. this is what a showdaow jar is.
java -cp .... a.b.c.Main // this is what the gradle application plugin gives you.

in my example i dont care about synatax coloring since this is not part of the language server protocol yet but a client specific thing. and yes it supports all language server features that xtext and che support. and ys it is working (as i said with a patched che to mitigate che bugs)

from xtext-languageserver-example.

chetanladdha avatar chetanladdha commented on August 24, 2024

Thank you !!
That make sense for me now. I am trying to play with your code, I tried on couple of systems to build your code but I am getting below compilation failures, any chance if you have seen it:

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project assembly-wsagent-war: Compilation failure: Compilation failure: [ERROR] warning: Supported source version 'RELEASE_6' from annotation processor 'org.jvnet.hudson.annotation_indexer.AnnotationProcessorImpl' less than -source '1.8' [ERROR] C:\dsl\che\assembly\assembly-wsagent-war\src\main\java\org\eclipse\che\wsagent\server\CheWebSocketEndpoint.java:[15,46] error: cannot find symbol [ERROR] symbol: class PendingMessagesReSender

Maven -v output:
λ mvn -v Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T22:11:47+05:30) Maven home: C:\Softwares\apache-maven-3.3.9 Java version: 1.8.0_25, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.8.0_25\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

Any pointer will be helpful.

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

i have no idea.i simply do a mvn clean install -Pfast

from xtext-languageserver-example.

chetanladdha avatar chetanladdha commented on August 24, 2024

It got compiled with -Pfast option, not directly with mvn clean install,
but getting below error while starting server:
λ che.bat
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json: open //./pipe/docker_engine: The system cannot find the file specified.

Any thought ?

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

what do you do to start che.

i do docker run -v /var/run/docker.sock:/var/run/docker.sock -e CHE_DEBUG_SERVER=true -e CHE_ASSEMBLY=/home/dietrich/che/assembly/assembly-main/target/eclipse-che-5.0.0-M8-SNAPSHOT/eclipse-che-5.0.0-M8-SNAPSHOT/ codenvy/che-launcher:nightly start

from xtext-languageserver-example.

chetanladdha avatar chetanladdha commented on August 24, 2024

Thanks @cdietrich. It was Windows specific issue mentioned at eclipse-che/che#2449,
I am able to start the che but facing issue while creating the project:
Getting error while creating project Unable create new file. Item specified as parent is not a folder.

I am debugging issue, let me know if you have seen before.
It would be great if you can list down the steps you followed to run this branch? (If you have done anything extra other than normal che starting steps)

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

do you create the PHP Stack + project?

from xtext-languageserver-example.

chetanladdha avatar chetanladdha commented on August 24, 2024

Yes...

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

sry i have no idea on this.

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

i rebased after the hardcoding is no longer needed: https://github.com/cdietrich/che/tree/xtext2rx

from xtext-languageserver-example.

chetanladdha avatar chetanladdha commented on August 24, 2024

Great @cdietrich.

from xtext-languageserver-example.

chetanladdha avatar chetanladdha commented on August 24, 2024

@cdietrich : Could you please let me know how you generated mydsl.jar, is this just simple jar created/exported from eclipse? Have you use latest Xtext 2.11 beta version for the creation of MyDSL project ?

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

i used this project here in the version before the switch to the gradle application plugin
(https://github.com/itemis/xtext-languageserver-example/tree/379f7ac28d5b16ee00a71b560471ff6f6c55721a)

it is created by a adapted gradle build (shadow jar)
and yes i use xtext 2.11 and no i did some manual changes to the project to create the shadow jar.
but: if you use xtext 2.11 it will generate the java service loader config that is needed

you could use the current state as well and deploy a zipped app and unzip it in the agent script

from xtext-languageserver-example.

chetanladdha avatar chetanladdha commented on August 24, 2024

Thanks @cdietrich.

I am playing with your https://github.com/cdietrich/che/tree/xtext2rx prototype but it's blocked with below message, it's not moving ahead, any thought ?
image

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

have no idea

  • make a new workspace
  • create a project
  • use console to look at /hoome/user/che if the jar and script was downloaded and can be executed
  • if it is there and works: create mydsl file

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

p.s: and clear the browser cache to make sure current javaa script stuff from che is used

from xtext-languageserver-example.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.