Question about: BasicDecorationNodeImpl and persistedChildren feature [message #232806] |
Sun, 07 June 2009 05:25  |
Eclipse User |
|
|
|
Hi,
I have a detailed question about the Basic Decoration Node and the persistedChildren feature. This question comes up
because of a problem a Teneo user has with persisting a diagram with a note.
My generic question is about how the persistedChildren feature is implemented in BasicDecorationNodeImpl. Looking at the
BasicDecorationNodeImpl class I don't see a java member for the persistedChildren feature. The feature is however
present as the BasicDecorationNodeImpl implements the View interface/EClass which has these features.
BasicDecorationNodeImpl does however not inherit from ViewImpl but from EModelElementImpl. This would mean (as there is
no java member) that persistedChildren are a dynamic efeature but this does neither appear to be the case.
Then another thing is that BasicDecorationImpl has several methods to modify the persistedChildren set. All these modify
methods call getPersistedChildren() to get to the current list of persistedChildren. However, getPersistedChildren
returns an EcoreEList.UnmodifiableEList, so afaics the persistedchildren never can get changed. So is persistedChildren
(and transientChildren) ever used in BasicDecorationNode?
If not then a workaround for this issue for Teneo is that I can ignore the persistedChildren for persistence (making
them transient). Is this dangerous or can I safely do this?
btw, I am working on eclipse 3.5 and gmf rc3. This issue has also been reported for eclipse 3.4 and the related gmf
version.
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
|
|
|
|
Re: Question about: BasicDecorationNodeImpl and persistedChildren feature [message #232989 is a reply to message #232981] |
Mon, 08 June 2009 11:36  |
Eclipse User |
|
|
|
Thanks Alex, I will for sure check the java doc next time!
gr. Martin
Alex Boyko wrote:
> Hi Martin,
>
> BasicDecorationNode doesn't support children, neither persisted nor
> transient. This is the design intention to cut down the memory
> consumption for GMF clients. Many times clients create model elements
> (views) for text compartment editparts, where the model is the name of
> the semantic element for example. Label is editable, so clients create
> an editpart and to create an editpart they create the model element,
> from which the only necessary information is the semantic hint (type
> attribute of the view). In a non-API breaking way with minimum adoption
> required we introduced BasicDecorationNode with a cut down features.
>
> JavaDoc for BasicDecorationNode lists the features that
> BasicDecorationNode does not support.
>
> BasicDecorationNode shall never have persisted/transient children,
> source/target edges and styles.
>
> Hope this helps.
>
> Cheers,
> Alex
>
>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.03908 seconds