[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: Custom code after initialization (Short question)

This is truly strange and frustrating.

When a diagram is constructed, 3 diagram elements are created. I add 2 nodes programmatically. In the visible diagram 4 nodes are created (!). I've tried adding nodes in the createDiagram(...) method, but this doesn't work. I've also tried adding them through commands when the editpart of the diagram gets created.

Surely there must be an easiers way to add nodes to a diagram upon creation ???

Any input appreciated !


Best Regards,

Tomas Zijdemans


Ed Merks wrote:
Tomas,

This sounds like purely a GMF question so I've added the GMF newsgroup to the "to" list of the reply so it can be answered there.


Tomas Zijdemans wrote:
Hi all :)

I'm trying to execute some model specific code after a diagram has been initialized (add some elements that always should be present at startup). I've experimented with the constructor of the diagram element, but this constructor gets called many times at startup, and my code should only be run once per diagram. Where should I rather put my code?


Best Regards,

Tomas Zijdemans