Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Resolvig ProxyObjects from importUri Scope(I can not resolve Ecore proxy objects gotten from an importUriScopeProvider)
Resolvig ProxyObjects from importUri Scope [message #1391796] Tue, 01 July 2014 08:24 Go to next message
Eclipse UserFriend
I can not resolve Ecore proxy objects gotten from an importUriScopeProvider neither implicid as it should be nor expicit with:
EcoreUtil.resolveAll(eObjectOrProxy)

I am doing:
@Inject
protected ImportUriGlobalScopeProvider importUriScopeProvider;
...
final IScope scope = importUriScopeProvider.getScope(eResource, XtextPackage.Literals.GRAMMAR__RULES);
eods = scope.getAllElements()
eop = eods.iterator().next()

I get a non empty list but the values of the proxy objects are always null.
What I am doing wrong ?
Re: Resolvig ProxyObjects from importUri Scope [message #1391880 is a reply to message #1391796] Tue, 01 July 2014 10:50 Go to previous messageGo to next message
Eclipse UserFriend
Standalone or in eclipse? standalone all resources have to be added to the resourceset manually
Re: Resolvig ProxyObjects from importUri Scope [message #1391921 is a reply to message #1391880] Tue, 01 July 2014 11:51 Go to previous messageGo to next message
Eclipse UserFriend
Christian Dietrich wrote on Tue, 01 July 2014 10:50
Standalone or in eclipse? standalone all resources have to be added to the resourceset manually

In eclipse inside a ProposalProvider. So I asume all resources should have been added already. And as I mentions the list is not empty what it would be if the resource would not have been available.
Re: Resolvig ProxyObjects from importUri Scope [message #1392100 is a reply to message #1391921] Tue, 01 July 2014 18:12 Go to previous messageGo to next message
Eclipse UserFriend
the question is: why do you need to do that in the proposal provider?
Re: Resolvig ProxyObjects from importUri Scope [message #1392936 is a reply to message #1392100] Wed, 02 July 2014 22:47 Go to previous messageGo to next message
Eclipse UserFriend
Christian Dietrich wrote on Tue, 01 July 2014 18:12
the question is: why do you need to do that in the proposal provider?

I simply want to generate proposals based on the objects that are in scope.
Re: Resolvig ProxyObjects from importUri Scope [message #1392987 is a reply to message #1392936] Thu, 03 July 2014 00:40 Go to previous message
Eclipse UserFriend
is it for cross refs? is it for something else?
it would be nice to get a concrete usecase. maybe one of the existing hook already fit.


and of course the scope provider delivers only elements from the index. (IEObjectDescription) which have EObjectorproxy that are ideally all proxies.
for resolving you should pass in the actual context ("model") you have

EcoreUtil.resolve(EObject proxy, EObject objectContext)
Previous Topic:How can I create a variable or static initializer with Xbase means
Next Topic:Prevent UpdateEditorStateJob and XtextBuilder from concurrent execution
Goto Forum:
  


Current Time: Wed Jul 23 11:03:13 EDT 2025

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

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

Back to the top