Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Initialize a ResourceSet with some library models
Initialize a ResourceSet with some library models [message #1729057] Sun, 10 April 2016 13:06 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1754
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi

for a DSL (NOT based on Xbase), I'm providing a library with some model
files. These model files are in a bundle, on which my DSL projects
depend on. So the model elements in the library are visible to my DSL
projects.

These library model files have some mutual dependencies, and these are
not resolved inside the library model files. I think that's because the
library model resources are not loaded in the resource set from the
beginning, is that right?

I'd like these model files to be automatically loaded (but not resolved
of course) in every ResourceSet for my DSL files. Would that solve the
above problem? In that case, which is the best way to achieve that?

many thanks in advance
Lorenzo

--
Prof. Lorenzo Bettini, Computer Science, DISIA, Univ. Firenze
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Initialize a ResourceSet with some library models [message #1729058 is a reply to message #1729057] Sun, 10 April 2016 14:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13186
Registered: July 2009
Senior Member
Did you adapt ProjectStateHelper and ToBeBuiltContribution as xtext does it
for Java projects?


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Initialize a ResourceSet with some library models [message #1729060 is a reply to message #1729058] Sun, 10 April 2016 16:33 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1754
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 10/04/2016 16:31, Christian Dietrich wrote:
> Did you adapt ProjectStateHelper and ToBeBuiltContribution as xtext does it
> for Java projects?
>

Hi

you mean org.eclipse.xtext.ui.containers.JavaProjectsStateHelper and
org.eclipse.xtext.builder.impl.javasupport.JdtToBeBuiltComputer ?

Wouldn't initialize a resource set easier? Or is that discouraged?

thanks in advance
Lorenzo

--
Prof. Lorenzo Bettini, Computer Science, DISIA, Univ. Firenze
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Initialize a ResourceSet with some library models [message #1729061 is a reply to message #1729060] Sun, 10 April 2016 16:37 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13186
Registered: July 2009
Senior Member
guess initializing the resourceset is easy. the question is. what are the right places. i dont know.
doing the points i mentioned seems to work.


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Initialize a ResourceSet with some library models [message #1729278 is a reply to message #1729057] Tue, 12 April 2016 14:09 Go to previous messageGo to next message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 149
Registered: July 2009
Senior Member
Lorenzo,

I will need to do something similar in the near future. Will your solution be publicly available?

Thanks,
Lutz
Re: Initialize a ResourceSet with some library models [message #1729340 is a reply to message #1729278] Wed, 13 April 2016 08:31 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1754
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 12/04/2016 16:09, Lutz Wrage wrote:
> Lorenzo,
>
> I will need to do something similar in the near future. Will your
> solution be publicly available?
>
> Thanks,
> Lutz

Hi Lutz

for the moment I'm not applying none of these solutions. If I do that,
or perform some experiments, it will surely be publicly available :)

cheers
Lorenzo

--
Prof. Lorenzo Bettini, Computer Science, DISIA, Univ. Firenze
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Previous Topic:use XText RunTimeModule for custom class
Next Topic:Xtext Intellij integration
Goto Forum:
  


Current Time: Thu Nov 14 05:59:46 GMT 2019

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

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

Back to the top