External dependencies with Xtext builder [message #991648] |
Wed, 19 December 2012 22:58 |
Zoltan Ujhelyi Messages: 392 Registered: July 2015 |
Senior Member |
|
|
Hi,
we are developing an Xtext-based language, that refers to a project-specific configuration file, that describe referrable resources. We have a custom scoping implemented, that uses the information during parse and everything works as expected.
However, we noticed that Xtext does not track this dependency information automatically, so changing the file never triggers a rebuild of the dependent files.
I have experimented a lot with various services, but did not find a solution satisfying to us. I am reasonably sure, I did not model everything during scoping as Xtext expects, but I would like to try to solve the issues without breaking our existing implementation too much.
My question is two-folds:
1. Is it possible to provide a service that allows the manual specification of such dependencies - either by rebuilding the entire project if the configuration file changes or by directly connecting the files programmatically.
2. Or if the first solution is not supported and/or is impractical, can you tell me what is the recommended way to specify various extra EMF resource locations to use during scoping.
Thank you for your help,
Zoltan
|
|
|
Re: External dependencies with Xtext builder [message #992115 is a reply to message #991648] |
Thu, 20 December 2012 22:41 |
Henrik Lindberg Messages: 2509 Registered: July 2009 |
Senior Member |
|
|
On 2012-19-12 23:58, Zoltan Ujhelyi wrote:
> Hi,
>
> we are developing an Xtext-based language, that refers to a
> project-specific configuration file, that describe referrable resources.
I do something similar in cloudsmith / geppetto @ github. I have a model
of the runtime (in my case called .pptp) that is stored as an ecore
file. In addition, I parse ruby files that are in the workspace and
dynamically build .pptp models from those).
It is mostly a matter of registering the appropriate resource
descriptions and parsing/making the model available.
In my case I don't use the normal Xtext/EMF linking and thus I register
all the required information for rebuilding manually. If you use normal
links that should be done automatically for you once the framework is
aware of the relationship between your file and a model that you have
references to.
> We have a custom scoping implemented, that uses the information during
> parse and everything works as expected. However, we noticed that Xtext
> does not track this dependency information automatically, so changing
> the file never triggers a rebuild of the dependent files.
> I have experimented a lot with various services, but did not find a
> solution satisfying to us. I am reasonably sure, I did not model
> everything during scoping as Xtext expects, but I would like to try to
> solve the issues without breaking our existing implementation too much.
>
> My question is two-folds:
>
> 1. Is it possible to provide a service that allows the manual
> specification of such dependencies - either by rebuilding the entire
> project if the configuration file changes or by directly connecting the
> files programmatically.
You can do this manually if you want. The solution in Geppetto may be
overkill for you (start at the PPLinker if you are interested, but there
is quite a lot of code to read).
> 2. Or if the first solution is not supported and/or is impractical, can
> you tell me what is the recommended way to specify various extra EMF
> resource locations to use during scoping.
>
I have read blog posts describing how to have references to "other EMF
models" - also believe that this has been asked earlier in this forum,
try searching. (Or someone may have links to info more handy perhaps...).
Also, you can look at how I wire up support for the PPTP model in Geppetto.
Hope that helps
Regards
- henrik
|
|
|
|
Powered by
FUDForum. Page generated in 0.03618 seconds