|Re: [EMF CP] NewModelElementWizard for non root elements [message #782920 is a reply to message #781088]
||Tue, 24 January 2012 18:18
| Jonas Helming
Registered: July 2009
I wonder which version you are using? You are right, that this if
statement is incorrect. However the NewWizard should only be shown for
the root element. In the past we have also shown it for elements which
have more then 5 containments. The problem was that the wizard can only
select the class to create, not the reference to add the new element to.
In other words, if you had an element with more then 5 containment
features and to of them reference the same type, you could not select
which feature to use. In the latest Milestones, the wizard should only
be active on the root level.
Does this help you?
Am 20.01.2012 14:42, schrieb Michael Mising name:
> I have the following situation:
> Object A (which is not the root element) has more than 5 possible
> containment references. One of this containments, call it Object B, has
> a multiplicity of one. If I make a right click on A, the context menu
> offers me the option "New Model Element" and opens the
> NewModelElementWizard after a click on it.
> If I select object B in the wizard for adding to A and press the OK
> Button, nothing happens. B is not added to A.
> After a little debugging I found the following if-statement in the
> if (possibleContainingReference != null &&
> This case only happens, if the selected object (in my case object A) is
> not the root object (ECPProject). But the
> possibleContainingReference.isMany() constraint in the statement avoids
> the addition of B to A!
> My question now, is this the intended behaviour or a bug?
> It seems that my described case isn't handled by ECP.
> Best regards,
Powered by FUDForum
. Page generated in 0.08345 seconds