Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 06:26 Go to next message
Dennis Untiet is currently offline Dennis UntietFriend
Messages: 14
Registered: March 2022
Junior Member
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 06:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
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


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: xtext some .dsl files shall not be checked from grammar [message #1851103 is a reply to message #1851098] Mon, 28 March 2022 07:52 Go to previous messageGo to next message
Dennis Untiet is currently offline Dennis UntietFriend
Messages: 14
Registered: March 2022
Junior Member
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 08:51 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
you can bind the runtime one in runtime module, the ui one in ui module

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: xtext some .dsl files shall not be checked from grammar [message #1851122 is a reply to message #1851106] Mon, 28 March 2022 12:01 Go to previous messageGo to next message
Dennis Untiet is currently offline Dennis UntietFriend
Messages: 14
Registered: March 2022
Junior Member
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 13:18 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
https://github.com/search?q=bindIResourceServiceProvider&type=code
please also read
https://www.eclipse.org/Xtext/documentation/302_configuration.html#dependency-injection


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: xtext some .dsl files shall not be checked from grammar [message #1851361 is a reply to message #1851129] Mon, 04 April 2022 06:58 Go to previous messageGo to next message
Dennis Untiet is currently offline Dennis UntietFriend
Messages: 14
Registered: March 2022
Junior Member
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 07:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
did you delete the errors once manually?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: xtext some .dsl files shall not be checked from grammar [message #1851368 is a reply to message #1851366] Mon, 04 April 2022 08:29 Go to previous messageGo to next message
Dennis Untiet is currently offline Dennis UntietFriend
Messages: 14
Registered: March 2022
Junior Member
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 11:25 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
then you should debug
e.g. ToBeBuiltComputer


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Mon, 04 April 2022 11:26]

Report message to a moderator

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


Current Time: Fri Mar 29 00:48:41 GMT 2024

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

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

Back to the top