Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Executing directEdit request on EditOart after its creation
Executing directEdit request on EditOart after its creation [message #690023] Tue, 28 June 2011 19:39 Go to next message
Arieh Bibliowicz is currently offline Arieh BibliowiczFriend
Messages: 18
Registered: June 2011
Junior Member
Hello everyone.
I want to be able to execute direct editing of a label in an EditPart's Figure right after the figure is added to the diagram, as follows:
1) user selects the "Add Figure" tool from the pallete,
2) user clicks on the diagram and a new figure is created (this works already).
3) the application enables the direct editing of the figure's label automatically.
I've been reading the forum and searching the internet but haven't seen this done. Any help?
thanks
Re: Executing directEdit request on EditOart after its creation [message #1426465 is a reply to message #690023] Thu, 18 September 2014 20:06 Go to previous messageGo to next message
Cong Chen is currently offline Cong ChenFriend
Messages: 7
Registered: January 2013
Junior Member
Is your problem solved?
I want the same thing.
Thanks!
Re: Executing directEdit request on EditOart after its creation [message #1426823 is a reply to message #1426465] Fri, 19 September 2014 09:06 Go to previous message
Maarten Bezemer is currently offline Maarten BezemerFriend
Messages: 117
Registered: February 2012
Senior Member
Take a look at DirectEditPolicy, it is used to enable direct editing of an EditPart when it is added/created.

You basically need to extend this (abstract) class by filling the abstract methods:


  • getDirectEditCommand() to provide the actual command to perform the modification/edit.
  • showCurrentEditValue() to update the figure with the 'current value', so the 'cell editor' is able to use the correct dimensions.

Install the policy using
installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new MyDirectEditPolicy());
in the createEditPolicies() method of your EditPart.
Previous Topic:[ZEST] Lazy Graph Creation
Next Topic:Version of Draw2d running in a Browser
Goto Forum:
  


Current Time: Tue Nov 30 15:02:25 GMT 2021

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

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

Back to the top