Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XText Web. How finds ACE the Language Server?
XText Web. How finds ACE the Language Server? [message #1796935] Mon, 22 October 2018 14:43 Go to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi there,
I try to use as many parts as possible from examples. I can't use the existing Web-Project of Xtext so i imported the war-file of it to another project (Eclipse-PlugIn) There I modified a existing Servlet which has doGet() und doPost() to a XTextServlet and put all the libs in a directory. To show up the WebPage with the Ace-Editor I used

getServletContext().getRequestDispatcher("/index.html").forward(req, resp);

Instead of index.html was a "jsp" in the original doGet()-Method.
How does ACE find the way back? How it connects to the LanguageServer-Servlet?
I see Ace in the Browser, no errors during booting the WebServer... but no connection. The files don't show me a url and i have no welcome-page like on the original Apache. I can't use the same setup but need a way to connect.

Thanks for help
Markus
Re: XText Web. How finds ACE the Language Server? [message #1796938 is a reply to message #1796935] Mon, 22 October 2018 15:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
Hello Markus, Xtext Web and LSP have currently zero relation.
So the answer is not at all

The servlet is called from the client JavaScript code.
If you create a web project with gradle or maven
And launch jetty via launcher in the web project or maven or gradle
Then you should be able to observe communication with your browser web tools.
Please Note. Might be necessary to have least the H in the Hello Would example to get content assist working


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1797911 is a reply to message #1796938] Thu, 08 November 2018 12:25 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi there,
i read again and want to try s.th.
Is it possible to get the Language Server as a war-file? In eclipse i can just export the web-package as a war-file.
I want to connect the Monaco-Editor via Websocket to the LS, or another simple to use Editor for the Web without IDE. I would prefer a WebServer than start a jar.

Thanks
Markus
Re: XText Web. How finds ACE the Language Server? [message #1797912 is a reply to message #1797911] Thu, 08 November 2018 12:41 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
you can package whatever you want into your war.
just add a dependency to mydsl.ide and mydsl and lsp4j*
then it should be there


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1797950 is a reply to message #1797912] Fri, 09 November 2018 07:01 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi again,

How can I connect to the LS via WebSocket?
I hosted the war on a Apache and find it here
http://localhost:8080/org.xtext.example.mydsl.web/

what is the address of the websocket when I want to use the following Code with the Monaco-Editor?

// create the web socket
const url = createUrl('/sampleServer')
const webSocket = createWebSocket(url);
// listen when the web socket is opened
listen({


sorry, I'm a little bit confused with all this things, have to find the way through.
Thanks
Markus
Re: XText Web. How finds ACE the Language Server? [message #1797954 is a reply to message #1797950] Fri, 09 November 2018 08:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
you have to create something that starts the server and exposes it via websocket yourself.
afaik there is nothing you can use OOTB and that is foolproof.
have a look at
https://github.com/eclipse/lsp4j/pull/211
https://github.com/itemis/xtext-languageserver-example/blob/master/org.xtext.example.mydsl.websockets/src/org/xtext/example/mydsl/websockets/ (all just experimetal stuff)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799468 is a reply to message #1797954] Fri, 07 December 2018 10:56 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi again,
some hours later I have an Xtext Language Server with Websocket and i added websocket to the monaco-editor. In the cmdline it seems that it connects but it doesn't parse my example language.
I don't know what to tell the monaco-editor that it finds my mydsl from the xtext-Server. There is a line :
"model: monaco.editor.createModel(value, 'mydsl',monaco.Uri.parse('inmemory:/MyDslParser')),"
and what is the mime type of this? application/java? text/plain?
No idea what to edit. Thanks
Markus
Re: XText Web. How finds ACE the Language Server? [message #1799469 is a reply to message #1799468] Fri, 07 December 2018 11:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
Are you sure you told Monaco to know the Lang
Are you sure the messages are correct
Eg header vs non Header ( Monaco Client does not send/like headers) https://github.com/TypeFox/vscode-ws-jsonrpc/issues/6


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Fri, 07 December 2018 11:43]

Report message to a moderator

Re: XText Web. How finds ACE the Language Server? [message #1799471 is a reply to message #1799469] Fri, 07 December 2018 11:45 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
I found two tutorials to add this websocket to monaco and xtext language server.
To connect it i use: const url = 'ws://localhost:4389', in the editor and commandline says it's connected.
The editor code has following:

// register Monaco languages
monaco.languages.register({
id: 'mydsl',
extensions: ['mydsl'],
aliases: ['MYDSL'],
mimetypes: ['application/Java'],
});

and

const editor = monaco.editor.create(document.getElementById("container")!, {
model: monaco.editor.createModel(value, 'mydsl',monaco.Uri.parse('inmemory:/MyDslParser')),
glyphMargin: true,
lightbulb: {
enabled: true
}
});

No idea how to teach Monaco mydsl from the server. I tried some things in ths Uri.parse(), but failed
Re: XText Web. How finds ACE the Language Server? [message #1799472 is a reply to message #1799471] Fri, 07 December 2018 11:54 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
i dont understand. does monaco talk to your server or does it not. (did you debug that?)
and if not how do you connect to the server?


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Fri, 07 December 2018 11:54]

Report message to a moderator

Re: XText Web. How finds ACE the Language Server? [message #1799473 is a reply to message #1799472] Fri, 07 December 2018 12:10 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
This i have in the commandline when i start the language server

0 [main] INFO mydsl.websockets.RunWebSocketServer - Language Server started
1 [main] INFO mydsl.websockets.RunWebSocketServer - Waiting for client to c
onnect to web socket on port 4389 ...

This is added when i open the monaco editor in the browser, hosted in the apache.

154353 [main] INFO mydsl.websockets.RunWebSocketServer - Connected.

I don't debug in the browser. Something i still have to learn
Re: XText Web. How finds ACE the Language Server? [message #1799474 is a reply to message #1799473] Fri, 07 December 2018 12:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
then please debug into the messages received on server side. are you sure they contain the lsp header.
last time i did they did not and this let the server crash.
thus i had to add headers manually after reading from websocket and strip them before sending to websocket.
(see the link in my edited message above)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799490 is a reply to message #1799474] Fri, 07 December 2018 16:35 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
What i found , when i try autocompletion (Strg+shift) is this: svg+xml

Request URL: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTUgMTUiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDE1IDE1OyI+CjxwYXRoIHN0eWxlPSJmaWxsOiNCNkI2QjYiIGQ9Ik0xMSw0djdINFY0SDExIE0xMiwzSDN2OWg5VjNMMTIsM3oiLz4KPGxpbmUgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzZCNkI2QjtzdHJva2UtbWl0ZXJsaW1pdDoxMCIgeDE9IjEwIiB5MT0iNy41IiB4Mj0iNSIgeTI9IjcuNSIvPgo8L3N2Zz4=

decoded:
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M8 1c-3.865 0-7 3.135-7 7s3.135 7 7 7 7-3.135 7-7-3.135-7-7-7zm1 12h-2v-7h2v7zm0-8h-2v-2h2v2z" fill="#1BA1E2"/><path d="M7 6h2v7h-2v-7zm0-1h2v-2h-2v2z" fill="#fff"/></svg>
Re: XText Web. How finds ACE the Language Server? [message #1799499 is a reply to message #1799490] Fri, 07 December 2018 17:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
As I said please debug the server. Or provide a example of what you do

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799502 is a reply to message #1799499] Fri, 07 December 2018 18:48 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi, sorry
i use https://github.com/cdietrich/xtext-languageserver-example. Actually i import the folder with websockets to my standard xtext mydsl example and build with gradle. I needed a while to build. First import in eclipse to workdspace than copy it into "parent", than add "include" to gradle-script and build at the console.
In the folder "/build" i find my webserver
The Monaco-Editor I found in https://typefox.io/teaching-the-language-server-protocol-to-microsofts-monaco-editor
For the server side, there are three servers implemented. I tried RunWebSocketServer and RunWebSocketServer2 but without success
Re: XText Web. How finds ACE the Language Server? [message #1799506 is a reply to message #1799502] Fri, 07 December 2018 19:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
Well i mean your client

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799507 is a reply to message #1799506] Fri, 07 December 2018 19:56 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
And as I said debug the server

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799512 is a reply to message #1799507] Fri, 07 December 2018 22:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
p.s.: which browser do you use?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799526 is a reply to message #1799512] Sat, 08 December 2018 13:33 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi,
for the client I use the one in the folder monaco-languageclient/example from typefox. There is an additional json-server but i don't know what for.
The Browser is Google Chrome.
I have to look how to debug the Server. I had Problems to include this websocket part in Eclipse, and so i have no IDE when I build it, just gradle scri and no debugger
Re: XText Web. How finds ACE the Language Server? [message #1799529 is a reply to message #1799526] Sat, 08 December 2018 14:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
You can simply import the example as Gradle project into eclipse

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799623 is a reply to message #1799529] Tue, 11 December 2018 13:05 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi again,
i found out to debug the server and it throws an exception when i simply press "return" in the editor. somwhere in int c = input.read(); it throws throw new JsonRpcException(exception);

17930 [main] INFO mydsl.websockets.RunWebSocketServer - Connected.
Dez 11, 2018 1:52:07 PM org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor run
SCHWERWIEGEND: java.net.SocketException: Software caused connection abort: socket write error
org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.net.SocketException: Software caused connection abort: socket write error
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:120)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

omg
Re: XText Web. How finds ACE the Language Server? [message #1799625 is a reply to message #1799623] Tue, 11 December 2018 13:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
in my example it worked if i cared about the heady thingy (the code in the repo has this partially commented out)

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799626 is a reply to message #1799625] Tue, 11 December 2018 13:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
=> can you please provide the client you use?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799703 is a reply to message #1799626] Wed, 12 December 2018 17:12 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi ,
i don't find code to uncomment in LS-Repo.
Here is the client, or what I think the client is

Markus

/* --------------------------------------------------------------------------------------------
* Copyright (c) 2018 TypeFox GmbH (http://www.typefox.io). All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* ------------------------------------------------------------------------------------------ */
import { listen, MessageConnection } from 'vscode-ws-jsonrpc';
import {
MonacoLanguageClient, CloseAction, ErrorAction,
MonacoServices, createConnection
} from 'monaco-languageclient';
const ReconnectingWebSocket = require('reconnecting-websocket');

// register Monaco languages
//monaco.languages.register({
// id: 'json',
// extensions: ['.json', '.bowerrc', '.jshintrc', '.jscsrc', '.eslintrc', '.babelrc'],
// aliases: ['JSON', 'json'],
// mimetypes: ['application/json'],
//});

// create Monaco editor
const value = `{
"$schema": "http://json.schemastore.org/coffeelint",
"line_endings": "unix"
}`;
const editor = monaco.editor.create(document.getElementById("container")!, {
model: monaco.editor.createModel(value, 'mydsl', monaco.Uri.parse('inmemory://model.mydsl')),
glyphMargin: true,
lightbulb: {
enabled: true
}
});

// install Monaco language client services
MonacoServices.install(editor);

// create the web socket
const url = 'ws://localhost:4389'
const webSocket = createWebSocket(url);
// listen when the web socket is opened
listen({
webSocket,
onConnection: connection => {
// create and start the language client
const languageClient = createLanguageClient(connection);
const disposable = languageClient.start();
connection.onClose(() => disposable.dispose());
}
});

function createLanguageClient(connection: MessageConnection): MonacoLanguageClient {
return new MonacoLanguageClient({
name: "Sample Language Client",
clientOptions: {
// use a language id as a document selector
documentSelector: ['mydsl'],
// disable the default error handler
errorHandler: {
error: () => ErrorAction.Continue,
closed: () => CloseAction.DoNotRestart
}
},
// create a language client connection from the JSON RPC connection on demand
connectionProvider: {
get: (errorHandler, closeHandler) => {
return Promise.resolve(createConnection(connection, errorHandler, closeHandler))
}
}
});
}

function createWebSocket(url: string): WebSocket {
const socketOptions = {
maxReconnectionDelay: 10000,
minReconnectionDelay: 1000,
reconnectionDelayGrowFactor: 1.3,
connectionTimeout: 10000,
maxRetries: Infinity,
debug: false
};
return new ReconnectingWebSocket(url, undefined, socketOptions);
}
Re: XText Web. How finds ACE the Language Server? [message #1799705 is a reply to message #1799703] Wed, 12 December 2018 17:54 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
I don't understand where is the mydsl support you added
I can only analyze I'd I have a client that I can simply start


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799708 is a reply to message #1799705] Wed, 12 December 2018 18:34 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi,
I don't know neither. The part below "// register Monaco languages" was not commented out. "mydsl" stood never in the document. The original doesn't work neither and i tried to edit "mydsl" here and there, but without any idea
My idea was that Monaco and LS connects via Websocket and everything is fine.
Re: XText Web. How finds ACE the Language Server? [message #1799709 is a reply to message #1799708] Wed, 12 December 2018 18:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
The idea is to do a register language for Monaco for mydsl

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799710 is a reply to message #1799709] Wed, 12 December 2018 18:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
Otherwise Monaco won't do anything.

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799739 is a reply to message #1799710] Thu, 13 December 2018 08:20 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
something like

// register Monaco languages
monaco.languages.register({
id: 'mydsl',
extensions: ['.mydsl'],
aliases: ['MYDSL', 'MyDsl'],
mimetypes: ['application/json'],
}); ?? I tried before

Another thing, i didn't find code to uncomment in the LS-repo for Websockets
Re: XText Web. How finds ACE the Language Server? [message #1799741 is a reply to message #1799739] Thu, 13 December 2018 08:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
yes you need to tell monaco to know the mydsl language.
i mean this line https://github.com/itemis/xtext-languageserver-example/blob/4805b9901e55aa4f80bfb22e87ea73149b9db962/org.xtext.example.mydsl.websockets/src/org/xtext/example/mydsl/websockets/RunWebSocketServer3.xtend#L81


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799748 is a reply to message #1799741] Thu, 13 December 2018 09:12 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
another thing is that the inmemory uris wont work ootb. (mybe you better try a monaco.Uri.parse('file:///Users/dietrich/git/xtext-languageserver-example/demo/a.mydsl') uri server and client share for first experiments


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799750 is a reply to message #1799748] Thu, 13 December 2018 09:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
or you use a uri that actually makes sense emf uri wise

model: monaco.editor.createModel(value, 'mydsl', monaco.Uri.parse('inmemory://demo/model.mydsl')),


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799768 is a reply to message #1799750] Thu, 13 December 2018 11:18 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
With RunWebSocketServer3 i get now in the (Run-Mode) (In Debug Mode i get Websocketnotconnected)

gogogo
start
open
message: {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"rootPath":null,"rootUri":null,"capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"]}},"definition":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true}}},"trace":"off","workspaceFolders":null}}
{"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":2,"hoverProvider":true,"completionProvider":{"resolveProvider":false,"triggerCharacters":["."]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":true,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"renameProvider":true,"executeCommandProvider":{"commands":["mydsl.a","mydsl.b","mydsl.c"]},"semanticHighlighting":{"scopes":[]}}}}
message: {"jsonrpc":"2.0","method":"initialized","params":{}}
open
message: {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"rootPath":null,"rootUri":null,"capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"]}},"definition":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true}}},"trace":"off","workspaceFolders":null}}
Dez 13, 2018 12:17:20 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SCHWERWIEGEND: Internal error: java.lang.reflect.InvocationTargetException
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)
at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
... 11 more
Caused by: java.lang.IllegalStateException: This language server has already been initialized.
at org.eclipse.xtext.ide.server.LanguageServerImpl.initialize(LanguageServerImpl.java:225)
... 16 more

{"jsonrpc":"2.0","id":0,"error":{"code":-32603,"message":"Internal error.","data":"java.lang.RuntimeException: java.lang.reflect.InvocationTargetException\r\n\tat org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)\r\n\tat org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:120)\r\n\tat org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:261)\r\n\tat org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:190)\r\n\tat org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)\r\n\tat org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)\r\n\tat org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)\r\n\tat java.util.concurrent.FutureTask.run(Unknown Source)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n\tat java.lang.Thread.run(Unknown Source)\r\nCaused by: java.lang.reflect.InvocationTargetException\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\r\n\tat java.lang.reflect.Method.invoke(Unknown Source)\r\n\tat org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)\r\n\t... 11 more\r\nCaused by: java.lang.IllegalStateException: This language server has already been initialized.\r\n\tat org.eclipse.xtext.ide.server.LanguageServerImpl.initialize(LanguageServerImpl.java:225)\r\n\t... 16 more\r\n"}}
message: {"jsonrpc":"2.0","id":1,"method":"shutdown","params":null}
{"jsonrpc":"2.0","id":1,"result":{}}
message: {"jsonrpc":"2.0","method":"exit","params":null}
Re: XText Web. How finds ACE the Language Server? [message #1799770 is a reply to message #1799768] Thu, 13 December 2018 11:22 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
no wait, i get it when i reload the browser page with the editor
Re: XText Web. How finds ACE the Language Server? [message #1799771 is a reply to message #1799770] Thu, 13 December 2018 11:24 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
I get this and then nothing happens on the editor

gogogo
start
open
message: {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"rootPath":null,"rootUri":null,"capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"]}},"definition":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true}}},"trace":"off","workspaceFolders":null}}
{"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":2,"hoverProvider":true,"completionProvider":{"resolveProvider":false,"triggerCharacters":["."]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"workspaceSymbolProvider":true,"codeActionProvider":true,"documentFormattingProvider":true,"documentRangeFormattingProvider":true,"renameProvider":true,"executeCommandProvider":{"commands":["mydsl.a","mydsl.b","mydsl.c"]},"semanticHighlighting":{"scopes":[]}}}}
message: {"jsonrpc":"2.0","method":"initialized","params":{}}
Re: XText Web. How finds ACE the Language Server? [message #1799772 is a reply to message #1799771] Thu, 13 December 2018 11:27 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
Which uri do you use right now

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799774 is a reply to message #1799772] Thu, 13 December 2018 12:00 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
const editor = monaco.editor.create(document.getElementById("container")!, {
model: monaco.editor.createModel(value, 'mydsl', monaco.Uri.parse('inmemory://demo/model.mydsl')),

the second argument of createModel was 'json', now i changed it to mydsl and restarted the apache. It doesn't parse my language

What i have to edit her?
jsonrpc or mydsl?

clientOptions: {
// use a language id as a document selector
documentSelector: ['json'],
// disable the default error handler
Re: XText Web. How finds ACE the Language Server? [message #1799775 is a reply to message #1799774] Thu, 13 December 2018 12:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
everything should be mydsl. (thought that would be clear)

do you get any errors in client side console?

monaco.languages.register({
id: 'mydsl',
extensions: ['.mydsl'],
aliases: ['MYDSL', 'mydsl'],
mimetypes: ['application/mydsl']});
});
model: monaco.editor.createModel(value, 'mydsl', monaco.Uri.parse('inmemory://demo/model.mydsl')),
documentSelector: ['mydsl'],


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Thu, 13 December 2018 12:11]

Report message to a moderator

Re: XText Web. How finds ACE the Language Server? [message #1799777 is a reply to message #1799775] Thu, 13 December 2018 12:22 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi,
much better. Whenever i press the keyboard, a message goes to the server. The Language consists of 'Hello'? This doesn't find autocomplete. Just the words which are already in the editor.


message: {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"inmemory://demo/model.mydsl","version":59},"contentChanges":[{"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":1}},"rangeLength":1,"text":""}]}}
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"inmemory://demo/model.mydsl","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":1}},"severity":1,"code":"org.eclipse.xtext.diagnostics.Diagnostic.Syntax","message":"missing EOF at \u0027{\u0027"}]}}
Re: XText Web. How finds ACE the Language Server? [message #1799778 is a reply to message #1799777] Thu, 13 December 2018 12:24 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
then there is still something wrong on your side that i cannot see.
i get this content assist answers

this is the request

message: {"jsonrpc":"2.0","id":4,"method":"textDocument/completion","params":{"textDocument":{"uri":"inmemory://demo/model.mydsl"},"position":{"line":3,"character":0},"context":{"triggerKind":1}}}

this is the response

{"jsonrpc":"2.0","id":4,"result":{"isIncomplete":true,"items":[{"label":"Hello","kind":14,"sortText":"00000","textEdit":{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"Hello"}},{"label":"New Greeting (Template with Choice)","kind":15,"sortText":"00001","insertTextFormat":2,"textEdit":{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"Hello ${1|A,B,C|} from ${2|A,B,you|}!"}},{"label":"New Greeting (Template with Placeholder)","kind":15,"sortText":"00002","insertTextFormat":2,"textEdit":{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"newText":"Hello ${1:name} from ${2:fromName}!"}}]}}




Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799779 is a reply to message #1799778] Thu, 13 December 2018 12:37 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
When I press 'H' within { }

I get this:

message: {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"inmemory://demo/model.mydsl","version":116},"contentChanges":[{"range":{"start":{"line":0,"character":1},"end":{"line":0,"character":1}},"rangeLength":0,"text":"H"}]}}
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"inmemory://demo/model.mydsl","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":1}},"severity":1,"code":"org.eclipse.xtext.diagnostics.Diagnostic.Syntax","message":"missing EOF at \u0027{\u0027"}]}}
message: {"jsonrpc":"2.0","id":142,"method":"textDocument/completion","params":{"textDocument":{"uri":"inmemory://demo/model.mydsl"},"position":{"line":0,"character":2},"context":{"triggerKind":1}}}
{"jsonrpc":"2.0","id":142,"result":{"isIncomplete":true,"items":[]}}
message: {"jsonrpc":"2.0","id":143,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"inmemory://demo/model.mydsl"},"range":{"start":{"line":0,"character":2},"end":{"line":0,"character":2}},"context":{"diagnostics":[]}}}
{"jsonrpc":"2.0","id":143,"result":[]}
message: {"jsonrpc":"2.0","id":144,"method":"textDocument/codeAction","params":{"textDocument":{"uri":"inmemory://demo/model.mydsl"},"range":{"start":{"line":0,"character":2},"end":{"line":0,"character":2}},"context":{"diagnostics":[]}}}
{"jsonrpc":"2.0","id":144,"result":[]}
Re: XText Web. How finds ACE the Language Server? [message #1799780 is a reply to message #1799779] Thu, 13 December 2018 12:45 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Anoother things is, when i build whith gradle the mydsl.ide, i get error in : ide.generateXtext...Execute generate for : org.xtext.example.mydsl.ide:generate Xtext


org.gradle.api.GradleException: Xtext validation failed, see build log for details.
at org.xtext.gradle.builder.XtextGradleBuilder.build(XtextGradleBuilder.java:196)
at org.xtext.gradle.tasks.XtextGenerate.generate(XtextGenerate.java:167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:117)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:106)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:85)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:65)
at org.gradle.api.internal.tasks.execution.ActionEventFiringTaskExecuter.execute(ActionEventFiringTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.TimeoutTaskExecuter.execute(TimeoutTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.SnapshotAfterExecutionTaskExecuter.execute(SnapshotAfterExecutionTaskExecuter.java:38)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:49)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:61)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:55)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:49)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:44)
at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:337)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:325)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:318)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:304)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
Re: XText Web. How finds ACE the Language Server? [message #1799781 is a reply to message #1799780] Thu, 13 December 2018 12:47 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
you should run gradle always from the root.
how does the model exactly look like and where do you invoke ca?
(testing with He|) gives me an error as well
but an exception the the backend too


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Thu, 13 December 2018 12:49]

Report message to a moderator

Re: XText Web. How finds ACE the Language Server? [message #1799782 is a reply to message #1799781] Thu, 13 December 2018 12:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
i pushed a fix that makes the code more robust

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799787 is a reply to message #1799782] Thu, 13 December 2018 14:07 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
I downloaded. this time with git-bash. I find some useless 'A''s in the Code which i have to erase. I hope i find all. Nothing changed.
what you mean with: "how does the model look like"? invoke? I just use downloaded code from the examples in the internet.

The only thing i find in the server message is:
Syntax","message":"missing EOF at \u0027{\u0027"}]}}
Re: XText Web. How finds ACE the Language Server? [message #1799788 is a reply to message #1799787] Thu, 13 December 2018 14:14 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
model: monaco.editor.createModel(value, 'mydsl', monaco.Uri.parse('inmemory://demo/model.mydsl')),
glyphMargin: true,
lightbulb: {
enabled: true
}
Re: XText Web. How finds ACE the Language Server? [message #1799789 is a reply to message #1799788] Thu, 13 December 2018 14:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
please make sure you use utf8 as encoding

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799790 is a reply to message #1799789] Thu, 13 December 2018 14:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
btw where do the bad ' (0027 come from?!?)
are you sure you dont try to edit a json file with mydsl?

Model looks like

Hello A!
Hello B from A!
Hello you from B!


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Thu, 13 December 2018 14:20]

Report message to a moderator

Re: XText Web. How finds ACE the Language Server? [message #1799813 is a reply to message #1799790] Fri, 14 December 2018 07:20 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
Hi again,
utf-8 is enabled. It was a json project, at least it had an json server provided, but i direct it to my xtext-server.
The error with EOF comes from, when i don't edit within brackets.
How do you build your Monaco-Editor?
Same model
Re: XText Web. How finds ACE the Language Server? [message #1799815 is a reply to message #1799813] Fri, 14 December 2018 07:38 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
What is this for? I thought just init text of editor.

// create Monaco editor
const value = `{
"$schema": "http://json.schemastore.org/coffeelint",
"line_endings": "unix"
}`;
Re: XText Web. How finds ACE the Language Server? [message #1799816 is a reply to message #1799815] Fri, 14 December 2018 08:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
i have hard times to follow you.
that monaco client you use has nothing todo with my mydsl server.
my mydsl server is for my mydsl grammar.

the monaco client if you dont change it is for json. if you adapt it for mydsl it is obvious to change the model you edit from json to mydsl


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1799818 is a reply to message #1799816] Fri, 14 December 2018 08:21 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
I downloaded the monaco editor together with a json server from typefox. Both compile but i don't start this server.
In the client.ts i changed everything from json to mydsl, whereelse i have to do it?

model: monaco.editor.createModel("value", 'mydsl', monaco.Uri.parse('inmemory://demo/model.mydsl')),
This 'value' i changed to string now, so this init-text is gone.
Re: XText Web. How finds ACE the Language Server? [message #1799820 is a reply to message #1799818] Fri, 14 December 2018 08:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
am not a typescript wizard.
you have to tell monaco to know the mydsl lang
you have to tell monaco to use the mydsl lang (when opening the editor and using as selector)
the content of the file should be actually a mydsl file


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1800115 is a reply to message #1799820] Thu, 20 December 2018 07:11 Go to previous messageGo to next message
Markus Häge is currently offline Markus HägeFriend
Messages: 56
Registered: August 2018
Member
ok,
i found a way for autocompletion. I have to edit it on client-side.
However, thank you very much. I look now for my language.
This issue is closed.
Re: XText Web. How finds ACE the Language Server? [message #1800116 is a reply to message #1800115] Thu, 20 December 2018 07:19 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13214
Registered: July 2009
Senior Member
dont get that. in my example autocompletion works completely fine (suing xtext 2.16 or a patched xtext 2.15)

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Web. How finds ACE the Language Server? [message #1801477 is a reply to message #1800116] Sun, 20 January 2019 20:54 Go to previous messageGo to next message
Mathias Schubanz is currently offline Mathias SchubanzFriend
Messages: 2
Registered: January 2019
Junior Member
Although I didn't work through all the details yet, I am facing the same problem. I want to make a Language Server talk (using web socket) to an instance of a Monaco Language Client. So, @Markus Häge, if you could share the sample you worked out on, for instance, github, it could not just help out me, but others as well!

I'll work through the input of yours ( @CD) and come back with questions if they arise. Should I use the same thread or shall I consider this one to be closed here?
Re: XText Web. How finds ACE the Language Server? [message #1801523 is a reply to message #1800116] Mon, 21 January 2019 16:28 Go to previous messageGo to next message
Mathias Schubanz is currently offline Mathias SchubanzFriend
Messages: 2
Registered: January 2019
Junior Member
I can only thank you two for the discussion here. I was able to connect my DSL via LSP to the monaco editor now. In the near future I am going to make a generic MWE available and post it here.
Re: XText Web. How finds ACE the Language Server? [message #1810389 is a reply to message #1801523] Fri, 09 August 2019 09:20 Go to previous message
Kai Gülzau is currently offline Kai GülzauFriend
Messages: 2
Registered: August 2019
Junior Member
@Mathias do you have a working example for monaco (with monaco-languageclient) connected via websockets to an example (arithmethic?) Xtext LSP Server?
Previous Topic:dangling reference to a derived object
Next Topic:Usage of EOF to consume a file in Xtext
Goto Forum:
  


Current Time: Wed Nov 20 19:19:38 GMT 2019

Powered by FUDForum. Page generated in 0.04937 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top