Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] Adding Syntax Highlighting to Xtext DSL [Language Server] in Eclipse Che

Hi SharkJ,

Eclipse Che and Eclipse IDE have nothing in common except the fact that they are both members of the Eclipse Foundation. Your expectation that and Eclipse IDE plugin will work in Che is mistaken. You might want to start by reading up on Che... things will be clearer.

/Thomas

On Wed, 2018-11-07 at 08:03 +0530, P J wrote:

I have created a language server for a simple 'Hello World' DSL using Xtext with the following grammar: -

grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals

generate myDsl "
http://www.xtext.org/example/mydsl/MyDsl
"

Model:
    greetings+=Greeting*;

Greeting:
    'Hello' name=ID '!';

When I create it as an Eclipse plugin and run as an Eclipse Application, everything works fine; syntax highlighting, auto completion works fine. However, when I create it as a Gradle build with Fat Jar, and implement the Fat jar into Eclipse Che as a sidecar (by pushing a dockerfile with the fat jar embedded in it into Docker Hub), syntax highlighting does not work as expected. However, the editor understands the language. I know this because it provides auto-completion support and underlines in red when I type syntactically wrong statements.

The statements do not have a colour variation at all. It looks like a simple .txt file. Is there a possible way to include syntax highlighting to my DSL when it is running in Eclipse Che?

Thanks in advance!

SharkJ.

_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx

To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/che-dev


Back to the top