Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Delivery default data together with DSL ?
Delivery default data together with DSL ? [message #896215] Tue, 17 July 2012 11:24 Go to next message
Eclipse UserFriend
Hi,

I would like to deliver default data together with my DSL bundles. This data is supposed to be referenced in the text model.

I know that I can put the text file containing those data types in an exported package (by manifest.mf) and then import this package in the other plugin that is using the DSL.

But I would like to know if there is any way of doing that without have to make such explicitly package import. Is there any way ?

thanks,

Cristiano
Re: Delivery default data together with DSL ? [message #896437 is a reply to message #896215] Wed, 18 July 2012 07:57 Go to previous messageGo to next message
Eclipse UserFriend
There is another way, but it is a bit hacky.

You have to provide your own org.eclipse.xtext.resource.IContainer
containing the index entries (IResourceDescription) for the elements in
the library models (what you call 'default data').

Then you have make a custom IContainer.Manager return this container as
'visible' for all other containers.

There are several ways to implement this, so it'd be best for you to dig
into the code and into the section on the index (Runtime Concepts /
Scoping / Global Scopes and Resource Descriptions) in the Xtext
documentation.


Am 17.07.12 17:24, schrieb Cristiano Gaviao:
> Hi,
>
> I would like to deliver default data together with my DSL bundles. This
> data is supposed to be referenced in the text model.
>
> I know that I can put the text file containing those data types in an
> exported package (by manifest.mf) and then import this package in the
> other plugin that is using the DSL.
>
> But I would like to know if there is any way of doing that without have
> to make such explicitly package import. Is there any way ?
>
> thanks,
>
> Cristiano
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Delivery default data together with DSL ? [message #896458 is a reply to message #896437] Wed, 18 July 2012 08:38 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jan,

Thanks for the tips I will investigate better.

What I'm trying to achieve is a way to deliver extensions to the main DSL, providing one or more library models plus templates (using elements of the library) .

In my osgi systems I used to do this kind of extensions using bundle fragments.

do you thing that approach like that would be possible in a xtext DSL ?

regards,

Cristiano
Re: Delivery default data together with DSL ? [message #896512 is a reply to message #896458] Wed, 18 July 2012 11:40 Go to previous message
Eclipse UserFriend
I have something similar: builtins.
I've my builtins in a xmi resource on my classpath.
The resource is made visible to global scope by adding its uri like a default imports (search on the forums!)
Previous Topic:How to mark the generated output folder run by XtextBuilder as derived
Next Topic:Replacing the standard EMF/JET based code generator
Goto Forum:
  


Current Time: Sat Jul 12 23:32:25 EDT 2025

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

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

Back to the top