Skip to main content



      Home
Home » Eclipse Projects » GEF » Creating something that is immediately available in DirectEdit mode
Creating something that is immediately available in DirectEdit mode [message #182212] Mon, 23 May 2005 16:16 Go to next message
Eclipse UserFriend
Originally posted by: pacheco.ai.sri.com

Hi,

In pursuit of my understanding of how to wire together tools to handle
more complex behavior, I am begining my attempts with trying to tweak
the CreationTool to create a node but have it immediately available in
an open state for editing. This is of course proving tricky.

What I'm trying to do is overide handleButtonUp to do all the
appropriate creating and then attempt to follow up with the handling
specific to the select's tool direct editing.

If anyone has any advice or alternatives to this approach. I would
appreciate them.

thanks,
John
Re: Creating something that is immediately available in DirectEdit mode [message #182267 is a reply to message #182212] Mon, 23 May 2005 17:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gslade.no.spam.us.ibm.com

In your createCommand you could tweak it so that after the child model
object has been created and added to the parent it could fire off ane event.
i.e child.fire(new ForcedDirectEditEvent(child));
The editpart can be listening for this event and respond by opening a
direct edit session on itself.
This is how I did it anyway.

Guy


John Pacheco wrote:
> Hi,
>
> In pursuit of my understanding of how to wire together tools to handle
> more complex behavior, I am begining my attempts with trying to tweak
> the CreationTool to create a node but have it immediately available in
> an open state for editing. This is of course proving tricky.
>
> What I'm trying to do is overide handleButtonUp to do all the
> appropriate creating and then attempt to follow up with the handling
> specific to the select's tool direct editing.
>
> If anyone has any advice or alternatives to this approach. I would
> appreciate them.
>
> thanks,
> John
Re: Creating something that is immediately available in DirectEdit mode [message #182638 is a reply to message #182267] Wed, 25 May 2005 20:04 Go to previous message
Eclipse UserFriend
Or override CreationTool 's performCreation() method and at the end past the
DirectEditRequest directly to the newly created EditPart (see
selectAddedObject() to see how to find the new EditPart).

"Guy Slade" <gslade.no.spam@us.ibm.com> wrote in message
news:d6thbb$pg4$1@news.eclipse.org...
> In your createCommand you could tweak it so that after the child model
> object has been created and added to the parent it could fire off ane
event.
> i.e child.fire(new ForcedDirectEditEvent(child));
> The editpart can be listening for this event and respond by opening a
> direct edit session on itself.
> This is how I did it anyway.
>
> Guy
>
>
> John Pacheco wrote:
> > Hi,
> >
> > In pursuit of my understanding of how to wire together tools to handle
> > more complex behavior, I am begining my attempts with trying to tweak
> > the CreationTool to create a node but have it immediately available in
> > an open state for editing. This is of course proving tricky.
> >
> > What I'm trying to do is overide handleButtonUp to do all the
> > appropriate creating and then attempt to follow up with the handling
> > specific to the select's tool direct editing.
> >
> > If anyone has any advice or alternatives to this approach. I would
> > appreciate them.
> >
> > thanks,
> > John
Previous Topic:Double Clicking on TreeEditPart
Next Topic:Adding a new property to a graphical element
Goto Forum:
  


Current Time: Sat Aug 30 00:24:56 EDT 2025

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

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

Back to the top