Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to edit a element by double-clicking the shape in the diagram editor
How to edit a element by double-clicking the shape in the diagram editor [message #22988] Fri, 18 August 2006 06:23 Go to next message
Eclipse UserFriend
Originally posted by: netsrujana.rediffmail.com

Hi,

I am creating shape and the subsequent element by prompting the user with a
dialog window (with attributes & references) in the diagram editor. Now I
want to invoke the dialog window to edit properties by double-clicking on a
shape.

I could see from the article "Introducing the GMF runtime", that by
double-clicking connection handles of the shapes, a pop-up window shows up
with related elements, can we override this to achieve the desired behavior.

Could some body help me out how this can be done.

regards,
Phani Kumar K.
Re: How to edit a element by double-clicking the shape in the diagram editor [message #23472 is a reply to message #22988] Fri, 18 August 2006 12:29 Go to previous message
Eclipse UserFriend
Phani Kumar Kotaprolu wrote:
> Hi,
>
> I am creating shape and the subsequent element by prompting the user with a
> dialog window (with attributes & references) in the diagram editor. Now I
> want to invoke the dialog window to edit properties by double-clicking on a
> shape.
>
> I could see from the article "Introducing the GMF runtime", that by
> double-clicking connection handles of the shapes, a pop-up window shows up
> with related elements, can we override this to achieve the desired behavior.
>
> Could some body help me out how this can be done.
>
> regards,
> Phani Kumar K.
>
>

Double click on shapes can be handled by using OpenEditPolicy, to add
double click handling to one of your shapes you will need to create an
edit policy that subclass OpenEditPolicy and install it on your shape
edit part like this
installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenStateEditPolicy())
then you can return the command you like by overriding the
getOpenCommand method in your edit policy
Previous Topic:Custom Figures and Synchronizing the model
Next Topic:Problem about the GMF Tutorial(mindmap diagram can not be created)
Goto Forum:
  


Current Time: Wed May 07 17:17:34 EDT 2025

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

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

Back to the top