Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Problem with get xtext resource for Xtend's doGenerate
Problem with get xtext resource for Xtend's doGenerate [message #896663] Thu, 19 July 2012 06:28 Go to next message
Eclipse UserFriend
Hi,
in my DSL I have import statement and when doGenerate was called I want to generate code also for imported file. I need to use xtextResourceSet from my xtend file, but
there are any resources available from XtextResourceSet.

My xtend code is:
var Injector injector = new xacmlStandaloneSetup().createInjectorAndDoEMFRegistration();

var XtextResourceSet set = injector.getInstance(XtextResourceSet.class);
   					
var URI uri = URI::createPlatformResourceURI(i.importURI,true);

var Resource res = set.getResource(uri,false)


Why other xtext resources aren't visible? Even if global scoping run correctly.
Otherwise if you know other way to compile imported file thanks in advance.
Re: Problem with get xtext resource for Xtend's doGenerate [message #896677 is a reply to message #896663] Thu, 19 July 2012 07:01 Go to previous messageGo to next message
Eclipse UserFriend
Hi you have to add all resources to the resource set yourself. Then
there is https://bugs.eclipse.org/bugs/show_bug.cgi?id=382555
~Christian

--
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: Problem with get xtext resource for Xtend's doGenerate [message #896694 is a reply to message #896677] Thu, 19 July 2012 08:05 Go to previous message
Eclipse UserFriend
It runs! Thanks very much Christian!
Previous Topic:Xtext sometimes fails to resolve references in global scope
Next Topic:Need help with Contentassist
Goto Forum:
  


Current Time: Sun Jul 13 11:36:36 EDT 2025

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

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

Back to the top