[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: [CDO] How can I get information on new objects in a view

Eike,

comments below

Am Freitag, den 18.09.2009, 09:56 -0400 schrieb Eike Stepper:
> Guys,
> 
> Comments below...
> 
> 
> 
> Stefan Winkler schrieb:
> > Simon,
> >   
> >>> Is there any way of doing a similar thing for new objects in the view
> >>> so that I can call an initialize() method?
> >>>       
> >> The group of objects you receive from CDOViewInvalidationEvent is
> >> really specific to your view. You will ONLY the list of detachedobject
> >> for objects that you have in your view. Others will not be there.
> >>
> >> Applying the same result for new objects....you will never receive
> >> such things.
> >>     
> > That depends, doesn't it?
> >   
> No ;-)
> 
> > If an object O is in my view, I would see 'new' objects if references
> > are added to a feature of O. E.g., if a resource is part of my view, an
> > addition to resource.getContents() would cause an event, wouldn't it?
> >   
> In these cases the event will carry *change* information *if* the 
> changed object is loaded by the view. You can never receive an "added" 
> information for an object because you're not able to load that object 
> into your view before it is added by another paty.

But that is what I meant. In my example you would get change events for
the resource, because the contents feature has changed. 
(Naturally, I have to figure out for myself if the change was adding a
new item to contents. But if it was, I could process it like that.

Cheers
Stefan