Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Access to Resource of other file
Access to Resource of other file [message #1350116] Mon, 12 May 2014 10:03 Go to next message
Eclipse UserFriend
Hi,

I have a problem with access to resources in other files.
For example, I have an Element E defined in the file file1 and I use it in the file file2.
In the plugin, I have no problem using E in file2, even the auto-completion with cross reference works.
In the MyDslGenerator, I can access to the element E only if it is used. When I scan resource.allContents, I can find only elements defined in the file1.

Is it possible to access to the element E directly from the resource of file1 ? without going through the use of E in file1 ?

Thanks
Re: Access to Resource of other file [message #1350363 is a reply to message #1350116] Mon, 12 May 2014 12:27 Go to previous messageGo to next message
Eclipse UserFriend
If you have all resources in the resource set you could ask your
resource for its resource set but this won't work in the builders
generator. Alternatively you could use the Xtext index to load all
resources that contain certain stuff. Could you elaborate a bit more
on your usecase

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: Access to Resource of other file [message #1409549 is a reply to message #1350116] Mon, 18 August 2014 07:25 Go to previous message
Eclipse UserFriend
Hi Raja,

Have your tried the suggestion from Christian, does it work for you?

I think I have the same request with you. Even more in my case the file1 and file2 is coming from different model (they have different file extension).
Previous Topic:How I make error message of code written in my program language?
Next Topic:xtext 2.6 and org.eclipse.search
Goto Forum:
  


Current Time: Sun Jul 06 09:07:05 EDT 2025

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

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

Back to the top