EObject from global scope has less information [message #684493] |
Wed, 15 June 2011 16:55 |
|
Hi
I am working on a DSL which has cross-references within files and between different files.
E.g. in file A:
in file B
RPM r:
x i(); // x is a cross reference to PE name 'x'
END
I have been trying to filter the contents of a scope in a ProposalProvider but notice that the information in the EObject is incomplete when the object is from the global scope (i.e. a different file). I am using the default scope provider.
I was working in xtext 1.0 but have now also tried xtext 2.0 which has the new feature of providing a pop-up when you hover over a proposal. I see this pop-up when hovering over a local item from the content proposal list but not when hovering over global item (from a different file).
Is this intended? Is there a way to include more information in the resource description?
Thanks for any guidance.
- Dyson
|
|
|
Re: EObject from global scope has less information [message #684536 is a reply to message #684493] |
Wed, 15 June 2011 18:50 |
|
Hi,
you could come up with an own impl of org.eclipse.xtext.resource.IDefaultResourceDescriptionStrategy
e.g. through subclassing DefaultResourceDescriptionStrategy
and add the additional information to the EObjectDescripions userData.
from the filter method you just ask the EObjectDescripion for the userdata
=> It doesn't play a role the EObjectDescripion may only contain a proxy to the eobject.
Btw. the hover doesn't work on proxys too. this is you get it only for non proxy eobjects. this seems to be indended.
~Christian
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
[Updated on: Wed, 15 June 2011 19:18] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03008 seconds