Git Product home page Git Product logo

Comments (12)

cdietrich avatar cdietrich commented on August 24, 2024

please check the startup script created by gradle.
i asusme code in extension ts is old/outdated/unrelated

or use the socket mode. there you can start the server from eclipse in debug mode

i also wonder if you need to configure something client side for didChangeWatchedFiles

i usually write a delegae message consumer here
return result;
instead of returning the original one.
you might be able to do the same for the io server

from xtext-languageserver-example.

RobertWalterU3d avatar RobertWalterU3d commented on August 24, 2024

Thanks. I am not sure what "socket mode" would be. Are you referring to something like this: https://github.com/itemis/xtext-languageserver-example/blob/master/vscode-extension/src/extension.ts ?

If yes, would that mean that I would need to also change gradle to launch the client differently from the RunServer type?

There are several startup scripts, my.namespace.mydsl.ide.bat, mydsl-socket.bat, mydsl-standalone.bat
They all use %XXX_OPTS% amongst others when running java, but I don't see where to set this property... I could set it manually, I guess.

So, is my understanding correct that this function is not having any effect?

from xtext-languageserver-example.

RobertWalterU3d avatar RobertWalterU3d commented on August 24, 2024

i usually write a delegae message consumer here
return result;
instead of returning the original one.
you might be able to do the same for the io server

Sorry, I am not following why a delegate like this would be needed and where I would put it, not sure what "io server" means.

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

result = new MessageConsumer() {consume(message m){ consumer.conume(m)}}

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

language servers can task to client via
java socket
process io
websocket

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

i dont know how the api that calls the gralde script from typescript set the options or not.
you would need to alter the script and debug

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

when i debug RunServer with the vscode-extension(this one uses socket) then i see didChangeWatchedFiles called

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

=> how did you customize the languageserverimpl

from xtext-languageserver-example.

RobertWalterU3d avatar RobertWalterU3d commented on August 24, 2024

I might have just misunderstood when this message is sent. It is send when the user changes what file is opened or in viewport, or when exactly?

public class MyDslLanguageServer extends LanguageServerImpl {

	private static final Logger LOG = Logger.getLogger(LanguageServerImpl.class);
	@Override
	public void didChangeWatchedFiles(DidChangeWatchedFilesParams params) {
		super.didChangeWatchedFiles(params);
		// trying to log some message here
	}
} 

from xtext-languageserver-example.

RobertWalterU3d avatar RobertWalterU3d commented on August 24, 2024

Could you help me once more in how I would go about if I want to debug the RunServer with a vscode-extension as well. I pretty much followed the setup of this repository setting up my projects.

from xtext-languageserver-example.

RobertWalterU3d avatar RobertWalterU3d commented on August 24, 2024

Okay, my original understanding was that this message is sent when the "watched" files change, i.e. if a file of extension ".mydsl" is edited in the client. Reading the spec again, I think my original understanding is correct. So, that is actually what I would like to be notified about in my server.
Also, can I configure what files my extension is watching?

from xtext-languageserver-example.

cdietrich avatar cdietrich commented on August 24, 2024

i guess this is something to ask in the languageserverprotocol and or vscode languageclient repo.
i dont get the edited point.
edits you will get notfied with didChange

i dont know what your debugging problem is. cant you simply edit the script and hard code remote debugging there? (or use the socket client + server as proposed, started in debug mode from eclipse (or idea))
i have no idea where you exactly are stuck

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.