Skip to main content



      Home
Home » Modeling » TMF (Xtext) » xtext some .dsl files shall not be checked from grammar
xtext some .dsl files shall not be checked from grammar [message #1851096] Mon, 28 March 2022 02:26 Go to next message
Eclipse UserFriend
Hello everyone,

In my grammar the DSL-File extension is called sql.
The problem is that in my project where I implement my grammar there are also .sql files that shall not be checked from my grammar. Can I specify the files that should be checked from my grammar?
For example my dsl file is always called install.dsl.

Thanks for helping!
Re: xtext some .dsl files shall not be checked from grammar [message #1851098 is a reply to message #1851096] Mon, 28 March 2022 02:46 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
Please check
https://github.com/eclipse/xtext-core/blob/76fff75212c3c4791ed213e6f947e9068addc9ae/org.eclipse.xtext/src/org/eclipse/xtext/resource/IResourceServiceProvider.java#L49
Or
https://github.com/eclipse/xtext-eclipse/blob/ce395d6e9a6804dbae088aaf6a6a9d0cafd60dfb/org.eclipse.xtext.ui/src/org/eclipse/xtext/ui/resource/DefaultResourceUIServiceProvider.java#L93
Re: xtext some .dsl files shall not be checked from grammar [message #1851103 is a reply to message #1851098] Mon, 28 March 2022 03:52 Go to previous messageGo to next message
Eclipse UserFriend
Thanks that brings me further.
Can you explain me where I have to bind my own ResourceProvider to?
There is the Workflow in my Project but I dont have a clue how to bind my ResourceProvider.
Re: xtext some .dsl files shall not be checked from grammar [message #1851106 is a reply to message #1851103] Mon, 28 March 2022 04:51 Go to previous messageGo to next message
Eclipse UserFriend
you can bind the runtime one in runtime module, the ui one in ui module
Re: xtext some .dsl files shall not be checked from grammar [message #1851122 is a reply to message #1851106] Mon, 28 March 2022 08:01 Go to previous messageGo to next message
Eclipse UserFriend
Can you give me an example picture?
I have a ResourceServiceProvider that extends the DefaultResourceServiceProvider and overrides the canHandle.
Where should I put it? And how do I bind it?
Re: xtext some .dsl files shall not be checked from grammar [message #1851129 is a reply to message #1851122] Mon, 28 March 2022 09:18 Go to previous messageGo to next message
Eclipse UserFriend
https://github.com/search?q=bindIResourceServiceProvider&type=code
please also read
https://www.eclipse.org/Xtext/documentation/302_configuration.html#dependency-injection
Re: xtext some .dsl files shall not be checked from grammar [message #1851361 is a reply to message #1851129] Mon, 04 April 2022 02:58 Go to previous messageGo to next message
Eclipse UserFriend
Ok I implemented the bindIResourceServiceProvider method in my Runtime Module.
This method returns my ResourceServiceProvider class. I also testet my overrided method and it should work. (The correct .sql file returns true and the other ones false). But there are still errors in the wrong .sql files.
What am I missing?
Re: xtext some .dsl files shall not be checked from grammar [message #1851366 is a reply to message #1851361] Mon, 04 April 2022 03:53 Go to previous messageGo to next message
Eclipse UserFriend
did you delete the errors once manually?
Re: xtext some .dsl files shall not be checked from grammar [message #1851368 is a reply to message #1851366] Mon, 04 April 2022 04:29 Go to previous messageGo to next message
Eclipse UserFriend
Yes. I deleted the errors but there are still showing up
Re: xtext some .dsl files shall not be checked from grammar [message #1851375 is a reply to message #1851368] Mon, 04 April 2022 07:25 Go to previous message
Eclipse UserFriend
then you should debug
e.g. ToBeBuiltComputer

[Updated on: Mon, 04 April 2022 07:26] by Moderator

Previous Topic:Update language server UI in non UI thread
Next Topic:Xtext String no quotes
Goto Forum:
  


Current Time: Sun Jul 06 05:27:24 EDT 2025

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

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

Back to the top