Create child element on parent creation ... [message #147305] |
Tue, 21 August 2007 15:38 |
Eclipse User |
|
|
|
Originally posted by: snej_NO-SPAM_.esuark.de
Hi there,
i need some help with that. I want to create a child object (view and
model element) when the creation of my parent is completed.
In detail i want that a special attribute (in my case EjbAttribute) is
created when the user adds a class (in my case EjbClass).
EjbClass has a reference (named attribute) to infinit EjbAttribute's.
I tried to use the informations about ICommand and so on i found in the
news and wikis, but i'm stuck.
What's the intended way to do that what i want to do? I think i only
need a hint where i have to start ...
regards
jens
|
|
|
|
|
Re: Create child element on parent creation ... [message #148098 is a reply to message #147350] |
Tue, 28 August 2007 14:04 |
Eclipse User |
|
|
|
Originally posted by: snej_NO-SPAM_.esuark.de
Boris Blajer wrote:
> You may create the child model element by declaring a Feature Seq
> Initializer in the mapping model for the node mapping that corresponds
> to EjbClass. Inside this initializer, declare a Reference New Element
> Spec. Note that you may further initialize the created new element with
> other initializers.
> If your diagram is synchronized, CanonicalEditPolicy will then create
> the visual representation of your EjbAttribute for you automatically.
That was a good advice, thanks.
Now i need to create another element on parent creation, but this time i
have to position the inner elements to special positions. With the
feature initializer that isn't possible, so i have to create and
position the graphical elements programmatically.
Do you have hints for that too?
regards
jens
|
|
|
Powered by
FUDForum. Page generated in 0.06353 seconds