| Deltas and specialized IResourceDescription [message #795017] |
Thu, 09 February 2012 19:48  |
Henrik Lindberg Messages: 2427 Registered: July 2009 |
Senior Member |
|
|
I have registered a listener of the type
IResourceDescription.Event.Listener and I get a call to my
implementation of:
public void descriptionsChanged(final Event event)
Inside this method, I get the delta from the event, and then ask the
delta for getNew() (thus obtaining a IResourceDescription).
My problem is that this is is not an instance of my specialized class
for resource description (lets call it MyResourceDescription).
What do I need to override to be able to produce a delta that returns my
specialized resource description?
A longer explanation:
My resource description contains additional information that is picked
up from adapters in the model. I would like to produce a delta of those
descriptions as well.
Regards
- henrik
|
|
|
|
|
|
| Re: Deltas and specialized IResourceDescription [message #796716 is a reply to message #795771] |
Sun, 12 February 2012 07:31  |
Sebastian Zarnekow Messages: 2788 Registered: July 2009 |
Senior Member |
|
|
Henrik,
it's used for the computation of the transitive closure of affected
resources by the builder. However, each language is responsible for it's
own resources and therefore for it's own indexed reference descriptions.
Cheers,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 10.02.12 23:51, schrieb Henrik Lindberg:
> On 2012-10-02 14:45, Sebastian Zarnekow wrote:
>> Hi Henrik,
>>
>> your specialized implementation will not be used by the builder since
>> the additional information cannot be persisted. Please file a ticket
>> that user data may be handy for IResourceDescriptions and describe the
>> usecase briefly.
>>
>
> Thanks, I figured that out - and I now fully understand why my
> specialization is not involved when using the indexed / persisted
> information and subsequently not being part of delta computation.
>
> I am now experimenting with a dynamic EReference.
>
> One question - where is the EReferenceDescription used besides
> "findrefs"? I want to make sure I don't screw up for other xtext based
> languages running at the same time.
>
> Right now, I have made my own implementation of findrefs + view, and I
> pass a null EReference and a counter, since what I need is basically the
> three URis in IReferenceDesription (source, source's exported container,
> and target).
>
> - henrik
>
|
|
|
Powered by
FUDForum. Page generated in 0.01654 seconds