Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Not resolving proxies after reloading model
Not resolving proxies after reloading model [message #703727] Wed, 27 July 2011 21:23 Go to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 301
Registered: July 2009
Location: Germany
Senior Member
Hi to all,

after migrating my project to indigo (XText 2.0.0)
I have the problem, that the following testcase doesn't work anymore.

1. XMLFile loaded and migrated on demand to xtext-dsl.
2. migrated model is saved ->my crossreferences are resolved, no proxys.
3. Loading this model from file again -> my crossreferences which reference from one file to
another file are proxies like "file:/..../mod/workflow/dsl/tests/workflows/MainFrame.mask#xtextLink_::0::7::/18
(the proxy-url is the same as the one I get in Xtext 1.0.0)


I saw in LazyLinker#createAndSetProxy these proxies are set at the reference.
But these proxies are never resolved to real references, which I definitively need, because I try navigate
over these references in scoping.

My questions:

1. Can you help me by telling where you think the resolving of these references is implemented?
2. If I call ECore2Util#resolve-method manually, the proxy is not resolved though. So maybe my proxies cannot be resolved
at all? What could be the cause of this disaster?

I debugged now a little bit further, and noticed that scoping doesn't work proper...
We have extended AbstractDeclarativeScopeProvider to implement our scoping and this delegates to ImportedNamespaceAwareLocalScopeProvider. It's method getImportedElements() returns an empty scope

Any help welcome,

Thanks by now

Best regards
Markus

[Updated on: Wed, 27 July 2011 22:16]

Report message to a moderator

Re: Not resolving proxies after reloading model [message #703737 is a reply to message #703727] Wed, 27 July 2011 21:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13613
Registered: July 2009
Senior Member
Hi,

can you elaborate a bit on how you are doing these steps?
Especially: how do you load the models. Global scope is built of the resources in the resourceset.

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 27 July 2011 22:26]

Report message to a moderator

Re: Not resolving proxies after reloading model [message #703985 is a reply to message #703737] Thu, 28 July 2011 06:43 Go to previous messageGo to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 301
Registered: July 2009
Location: Germany
Senior Member
Hi Christian,

ok, I found the bug.

Debugging in LinkingService (own implemention),
there is the following line:

QualifiedName qalifiedname = QualifiedName.create(s);
IEObjectDescription eObjectDescription = scope.getSingleElement(qalifiedname);


scope, which is a org.eclipse.xtext.scoping.impl.ImportScope, gets a qualified name vsa.marvin.mod.workflow.dsl.tests.workflows.JumpApp.MainMenu. We are in a resource tmp-gen/vsa/marvin/mod/workflow/dsl/tests/workflows/MainFrame.mask at this point and have a crossref to a object in another file tmp-gen/vsa/marvin/mod/workflow/dsl/tests/workflows/JumpApp.wf, so this seems to be correct to me.

But the file has a reference in model vsa.marvin.mod.workflow.dsl.tests.workflows.JumpApp.MainMenu and an import vsa.marvin.mod.workflow.dsl.tests.workflows.JumpApp.MainMenu as well, so the ImportScope creates a resolveName vsa.marvin.mod.workflow.dsl.tests.workflows.MainFrame.vsa.marvin.mod.workflow.dsl.tests.workflows.JumpApp.MainMenu, which is not found.
So I guess I have to debug my ImportOptimizer.

Thank you
Best regards
Markus





Re: Not resolving proxies after reloading model [message #704561 is a reply to message #703985] Thu, 28 July 2011 19:43 Go to previous message
Markus Oley is currently offline Markus OleyFriend
Messages: 301
Registered: July 2009
Location: Germany
Senior Member
and of cause.... this was the problem...
We implemented an own ImportOptimizer and created an QualifiedName with bla.x.y.z.Class, but all as string, so one segment was created.
This could never be optimizing Sad


OK, thanks for all
Markus
Previous Topic:Google Guice Exception starting my modelproject with XText2.0
Next Topic:Regex and Xtext
Goto Forum:
  


Current Time: Tue Sep 29 11:57:26 GMT 2020

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

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

Back to the top