Not resolving proxies after reloading model [message #703727] |
Wed, 27 July 2011 21:23 |
|
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 #703985 is a reply to message #703737] |
Thu, 28 July 2011 06:43 |
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03403 seconds