Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Deltas and specialized IResourceDescription
Deltas and specialized IResourceDescription [message #795017] Thu, 09 February 2012 19:48 Go to next message
Henrik Lindberg is currently offline 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 #795458 is a reply to message #795017] Fri, 10 February 2012 08:45 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian Zarnekow
Messages: 2788
Registered: July 2009
Senior Member
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,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 10.02.12 01:48, schrieb Henrik Lindberg:
> 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 #795771 is a reply to message #795458] Fri, 10 February 2012 17:51 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2427
Registered: July 2009
Senior Member
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
Re: Deltas and specialized IResourceDescription [message #795802 is a reply to message #795458] Fri, 10 February 2012 18:59 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik Lindberg
Messages: 2427
Registered: July 2009
Senior Member
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.

Logged https://bugs.eclipse.org/bugs/show_bug.cgi?id=371299

- henrik
Re: Deltas and specialized IResourceDescription [message #796716 is a reply to message #795771] Sun, 12 February 2012 07:31 Go to previous message
Sebastian Zarnekow is currently offline 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
>
Previous Topic:xText EPackages generation
Next Topic:Couldn't resolve reference to EPackage 'http://www.eclipse.org/xtext/xbase/Xbase'.
Goto Forum:
  


Current Time: Tue May 21 09:50:28 EDT 2013

Powered by FUDForum. Page generated in 0.01654 seconds