[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)

I had a similar requirement and I ended up overriding the doDefaultElementCreation() method in the CreateCommand class for my element and creating the child objects there on the actual EObject. Something like this:

/**
   * @generated NOT
   */
  @Override
  protected EObject doDefaultElementCreation() {
    MyObject obj = (MyObject) super.doDefaultElementCreation();
    obj.createChildObjects();
    return obj;
  }



Tomas Zijdemans wrote:
Alex Shatalin wrote:
Hello Tomas,

Geneated ???CreationWizard responsible for creating new diagram, so you can start from there. I suggest you to modify ???DiagramUtil.createDiagram() method and create your elements there.

Hi :)

I've tried adding elements here (both via adding objects to the diagram element's collection, and through commands - known to work), but without luck.

Well, anyways, thanks for helping.


Tomas Zijdemans