Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Compound create command
Compound create command [message #203522] Tue, 22 November 2005 17:46 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:doubts about gef
Next Topic:Rotating problem
Goto Forum:
  


Current Time: Thu Sep 19 05:05:15 GMT 2024

Powered by FUDForum. Page generated in 0.02968 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top