Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Question about: BasicDecorationNodeImpl and persistedChildren feature
Question about: BasicDecorationNodeImpl and persistedChildren feature [message #232806] Sun, 07 June 2009 09:25 Go to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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 #232874 is a reply to message #232806] Mon, 08 June 2009 09:58 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Martin,

From the implementation it looks like you can make these features transient
(exclude it from the persistence) - looks like BasicDecorationNodeImpl was
intentionally modified to prevent these nodes from having any kind of child
elements, but It’s better to ask somebody fro the runtime team to confirm
my guesses.

-----------------
Alex Shatalin
Re: Question about: BasicDecorationNodeImpl and persistedChildren feature [message #232902 is a reply to message #232874] Mon, 08 June 2009 10:50 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Alex,
Thanks for your reply. Is the runtime team monitoring this same forum or should I contact them in another way?

gr. Martin

Alex Shatalin wrote:
> Hello Martin,
>
> From the implementation it looks like you can make these features
> transient (exclude it from the persistence) - looks like
> BasicDecorationNodeImpl was intentionally modified to prevent these
> nodes from having any kind of child elements, but It’s better to ask
> somebody fro the runtime team to confirm my guesses.
>
> -----------------
> Alex Shatalin
>
>


--

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 persistedChildrenfeature [message #232909 is a reply to message #232902] Mon, 08 June 2009 10:53 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Martin,

> Thanks for your reply. Is the runtime team monitoring this same forum
I think so.

-----------------
Alex Shatalin
Re: Question about: BasicDecorationNodeImpl and persistedChildren feature [message #232981 is a reply to message #232806] Mon, 08 June 2009 15:00 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
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
Re: Question about: BasicDecorationNodeImpl and persistedChildren feature [message #232989 is a reply to message #232981] Mon, 08 June 2009 15:36 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
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
Previous Topic:Problem with link
Next Topic:How to override a paste command
Goto Forum:
  


Current Time: Wed Apr 01 21:52:05 GMT 2020

Powered by FUDForum. Page generated in 0.01457 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top