resolving cross-referenceshttps://www.eclipse.org/forums/index.php/mv/msg/438972/984278/#msg_984278
When resolving a cross-reference in LinkingService.getLinkedObjects, I was returning an object retrieved with something like

resourceSet.getEObject(uri, true)

which caused the respective file to be opened and reparsed. I changed the second argument to "false" and so far it seems that it's still working (but there's a lot to test still).

Is the first way the right one, or it doesn't matter? Maybe I'm just not doing anything yet with the returned value?

best regards,
Vlad
]]>Vlad Dumitrescu2012-11-14T15:04:03-00:00Re: resolving cross-referenceshttps://www.eclipse.org/forums/index.php/mv/msg/438972/985741/#msg_985741
resource is not yet loaded. In the default linking service, we use the
index and return a proxy rather than a resolved object. This will not
cause any files to be parsed. Have you tried that?

Am 14.11.12 16:04, schrieb Vlad Dumitrescu:
> Hi all,
>
> When resolving a cross-reference in LinkingService.getLinkedObjects, I
> was returning an object retrieved with something like
> resourceSet.getEObject(uri, true) which caused the respective file to be
> opened and reparsed. I changed the second argument to "false" and so far
> it seems that it's still working (but there's a lot to test still).
>
> Is the first way the right one, or it doesn't matter? Maybe I'm just not
> doing anything yet with the returned value?
>
> best regards,
> Vlad
>

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com]]>Jan Koehnlein2012-11-15T21:51:30-00:00Re: resolving cross-referenceshttps://www.eclipse.org/forums/index.php/mv/msg/438972/985746/#msg_985746
I another thread, I described that if I put all referenceable objects in the index this blows up the JVM's memory. There could be 3000 largish files in a project. So I got the suggestion to just keep the top-level constructs in the index, and then navigate the model. This obviously requires the objects to be resolved, but I thought they would be retrieved from a serialized form instead of from parsing the file again. This is how I did in my pre-Xtext implementation and took it for granted.

I understand your explanation that I got it working with a 'false' argument just by accident. Thanks!

regards,
Vlad
]]>Vlad Dumitrescu2012-11-15T22:42:26-00:00Re: resolving cross-referenceshttps://www.eclipse.org/forums/index.php/mv/msg/438972/985938/#msg_985938
These can be populated e.g. from the userData in the
IEObjectDescriptions. After all proxies are EObjects and behave to a
certain extend like those. Even though I would not recommend this as
long as you are 100% sure what you're doing, this might be something to
look at.

Am 15.11.12 23:42, schrieb Vlad Dumitrescu:
> Thanks Jan,
>
> I another thread, I described that if I put all referenceable objects in
> the index this blows up the JVM's memory. There could be 3000 largish
> files in a project. So I got the suggestion to just keep the top-level
> constructs in the index, and then navigate the model. This obviously
> requires the objects to be resolved, but I thought they would be
> retrieved from a serialized form instead of from parsing the file again.
> This is how I did in my pre-Xtext implementation and took it for granted.
>
> I understand your explanation that I got it working with a 'false'
> argument just by accident. Thanks!
>
> regards,
> Vlad
>

--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com]]>Jan Koehnlein2012-11-16T18:05:52-00:00Re: resolving cross-referenceshttps://www.eclipse.org/forums/index.php/mv/msg/438972/985953/#msg_985953
That might be interesting to explore, but there's one more thing that I'm unsure about and that is whether I know what I'm doing