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: 1812
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: 14665
Registered: July 2009
Senior Member
Did you adapt ProjectStateHelper and ToBeBuiltContribution as xtext does it
for Java projects?


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: 1812
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: 14665
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.


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: 181
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: 1812
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: Fri Apr 26 00:57:33 GMT 2024

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

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

Back to the top