Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 20: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 21: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] Thu, 26 May 2005 00:04 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
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 Apr 27 05:02:48 GMT 2024

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

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

Back to the top