Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Name of project containing the DSL(Getting the name of the project in which the DSL source is located)
Name of project containing the DSL [message #1634519] Wed, 25 February 2015 10:04 Go to next message
Claude Petitpierre is currently offline Claude PetitpierreFriend
Messages: 4
Registered: July 2009
Junior Member
I need the name of the project in which the DSL source clicked by the user is located to create som file within a JEE project.

I have seen, with the debugger, that is is available in the IFileSystemAccess fsa, but it is certainly private and I can't access it.

How can I get it ?
Re: Name of project containing the DSL [message #1634548 is a reply to message #1634519] Wed, 25 February 2015 10:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi

you can get it from the resource.
the resource has an URI
how you translate between uri and eclipse resources can be found here

https://wiki.eclipse.org/EMF/FAQ#How_do_I_map_between_an_EMF_Resource_and_an_Eclipse_IFile.3F

Please note: this will only work in an osgi environment.
in an standalone envionent you have to map between URI and the File System


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Name of project containing the DSL [message #1634622 is a reply to message #1634548] Wed, 25 February 2015 11:08 Go to previous message
Claude Petitpierre is currently offline Claude PetitpierreFriend
Messages: 4
Registered: July 2009
Junior Member
Thanks a lot for the quick and valuable response.
Previous Topic:Problem in Cross reference resolution on serialization
Next Topic:Which JDK version shall be used for Xtext
Goto Forum:
  


Current Time: Thu Apr 25 10:04:43 GMT 2024

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

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

Back to the top