Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Any VSCode Directions Updates?
Any VSCode Directions Updates? [message #1823650] Mon, 30 March 2020 18:05 Go to next message
Brandon Lewis is currently offline Brandon LewisFriend
Messages: 207
Registered: May 2012
Senior Member
I'm on my third unsuccessful attempt at trying to make a basic VSCode extension with Xtext following these two examples from 2016/Xtext 2.11:

https://blogs.itemis.com/en/integrating-xtext-language-support-in-visual-studio-code

https://www.typefox.io/blog/building-a-vs-code-extension-with-xtext-and-the-language-server-protocol

Both of them seem to give the impression this task is straightforward.

But I'm wondering if it's commonly understood that these need updates or have directions that no longer apply - either the Xtext part of the VSCode part?

Both blogs differ in their directions on how to do it. The Xtext documentation doesn't even mention it.

The Typefox example is quite clear until they ask me to do "something" following the documentation:

Quote:
As a next step, create a VS Code extension following the documentation. The official example uses a Node.js module to implement the server. You can change that to start your language server application by using the following code in extension.ts to create the server options:


The resulting vscode-extension folder I get is dramatically different than the GitHub example they link to. I've got a sub folder called xtext-server-example with bin/ and lib/ directories. Perhaps those are .gitignored? Am I supposed to add all the boilder plate *.json files?

The VSCode extension on the Items blog ends in *.vsix. It also mentioned a bunch of *.json files. Are all of these *.json files manually created by the person who wants to create the VSCode extension? Many of these JSON files have comments in them and error out in JSON editors. Is that expected?

Seems simple... according to the blogs, but I haven't been able to get anything to work yet.
Re: Any VSCode Directions Updates? [message #1823651 is a reply to message #1823650] Mon, 30 March 2020 18:10 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13655
Registered: July 2009
Senior Member
yes you are supposed to create all the vscode specific code yourself.
the bin/lib folders are created by the gradle application plugin.

there is a tool called vsce that turns the node module into a zipped vsix extension https://code.visualstudio.com/api/working-with-extensions/publishing-extension

you can find in https://github.com/itemis/xtext-languageserver-example examples for different
Xtext and vscode versions

for the latest Xtext and vscode version use https://github.com/itemis/xtext-languageserver-example/tree/cd_221_wip_vscode branch


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

[Updated on: Mon, 30 March 2020 18:27]

Report message to a moderator

Re: Any VSCode Directions Updates? [message #1823972 is a reply to message #1823651] Sun, 05 April 2020 20:28 Go to previous message
Brandon Lewis is currently offline Brandon LewisFriend
Messages: 207
Registered: May 2012
Senior Member
Okay. Thanks for trying to help. I'll have to determine what versions of Xtext I'll be using at the new job. Right now your newest example is beyond my home install of Xtext 2.15 and, unfortunately, I think I'm even more confused now. Seems to be an evolving and fast moving subject. I seem to be stuck between the nascent and current approaches.
Previous Topic:location not found for modeling/tmf/xtext/updates/releases/xpand/
Next Topic:Indirect left recursion
Goto Forum:
  


Current Time: Tue Nov 24 02:35:51 GMT 2020

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

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

Back to the top