Compound create command [message #203522] |
Tue, 22 November 2005 17:46 |
Eclipse User |
|
|
|
Originally posted by: og67_sanspouriel.laposte.net
Hi,
I want to create a coumpound command to create a few nodes in
my model after a drag and drop (just imagine dragging a directory) :
- one parent (a container)
- some children
1st solution,
I create all the command by hand (it works, but the
createAddCommand code is duplicated in the drop listener)
2nd solution,
I create a request for the parent
I use the target editpolicy.createAddCommand(request)
to get the command
and then, I cannot use the getCreateCommand() to get the children
commands because I don't have my parent editpart (and policies) at
this momment.
In other term, how do I create a add command with hierarchy ?
Regards
OG
|
|
|
Re: Compound create command [message #203555 is a reply to message #203522] |
Tue, 22 November 2005 19:23 |
Eclipse User |
|
|
|
Originally posted by: Lamont_Gilbert.rigidsoftware.com
haugh wrote:
> Hi,
>
> I want to create a coumpound command to create a few nodes in
> my model after a drag and drop (just imagine dragging a directory) :
> - one parent (a container)
> - some children
>
> 1st solution,
> I create all the command by hand (it works, but the
> createAddCommand code is duplicated in the drop listener)
>
>
>
> 2nd solution,
> I create a request for the parent
>
> I use the target editpolicy.createAddCommand(request)
> to get the command
>
> and then, I cannot use the getCreateCommand() to get the children
> commands because I don't have my parent editpart (and policies) at
> this momment.
>
>
> In other term, how do I create a add command with hierarchy ?
>
>
> Regards
> OG
>
>
All you need to create is the topmost component, and ensure all the new
children are properly added to it. I don't see what role existing
children would play in this creation!?
CL
|
|
|
Re: Compound create command [message #203610 is a reply to message #203555] |
Wed, 23 November 2005 09:20 |
Eclipse User |
|
|
|
Originally posted by: og67_sanspouriel.laposte.net
>
>
> All you need to create is the topmost component, and ensure all the new
> children are properly added to it.
You're right,
I thought it was more complex
Thanks
OG
|
|
|
Powered by
FUDForum. Page generated in 0.03079 seconds