Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Custom scope for only one Resource [solved]
Custom scope for only one Resource [solved] [message #1771570] Mon, 28 August 2017 08:04 Go to next message
Niko Stotz is currently offline Niko StotzFriend
Messages: 5
Registered: June 2010
Junior Member
Hi,

I'm creating a fake Xtext resource for an embedded editor. It resolves local references, but (obviously) nothing outside of it, because the resource is contained in its own ResourceSet.

I'd like to add a custom scope to only this resource, essentially delegating to the surrounding scope of my regular Resources (in a different ResourceSet).

Ideally, this should work without modifying the language infrastructure itself (i. e. the Module).

I'm using the org.eclipse.xtext.ui.editor.embedded.EmbeddedEditor.

Any ideas? Help is greatly appreciated.

Regards, Niko

[Updated on: Wed, 30 August 2017 08:20]

Report message to a moderator

Re: Custom scope for only one Resource [message #1771699 is a reply to message #1771570] Tue, 29 August 2017 16:04 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12044
Registered: July 2009
Senior Member
Hi can you give some more context.
Inside eclipse the container used for global scoping is the project so the resourceset does not play a direct role


Need professional support for Xtext, Xpand, EMF?
Go to: https://xtext.itemis.com
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Custom scope for only one Resource [message #1771757 is a reply to message #1771699] Wed, 30 August 2017 08:19 Go to previous message
Niko Stotz is currently offline Niko StotzFriend
Messages: 5
Registered: June 2010
Junior Member
Hi Christian,

thanks a lot, this already solved my problem!

I used to assign the URI "_synthetic.mydsl" to the fake resource . Now I changed it to "platform:/resource/myProject/path/to/original/__synthetic__resourceName.mydsl". This way, Xtext seems to find the project and resolves the scope just fine.

Thanks!
Previous Topic:using qualifiedNameConverter for the output
Next Topic:[SOLVED] Type resolver replies null
Goto Forum:
  


Current Time: Mon Jun 25 06:42:02 GMT 2018

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

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

Back to the top