Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Double-click on whitespace/canvas
Double-click on whitespace/canvas [message #524370] Wed, 31 March 2010 16:43
Iliyana Ivanova is currently offline Iliyana IvanovaFriend
Messages: 2
Registered: July 2009
Junior Member
Dear group,

I've been searching around for the right solution to the double-click on canvas/whitespace problem, but could not find the correct solution...

In short, two variants regarding double-clicking seem to be circulating around:

1) Installing an OpenEditPolicy for the EditPart seems to work only for the objects on the canvas- nodes/edges/etc, but not for the canvas itself

installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenEditPolicy() {
@Override
protected Command getOpenCommand(Request arg0) {
...
}
});

2) Overriding handleDoubleClick() of the SelectionTool in the palette... It seems to me that I have to climb over mountains, as everything is pretty much encapsulated in GMF... I have two suppositions: one is to go through createPaletteRoot() of the editor, and the other is to go through the PaletteFactory, but no idea what the best way is.

To cut a long story short... what's the easiest way to achieve this? And, if it's the second variant, could anyone elaborate on it?

Kind regards,
Iliyana Ivanova
Previous Topic:Modifying the underlying model of a diagram editor
Next Topic:How to detect a tool has changed or a click on a palette entry has occured?
Goto Forum:
  


Current Time: Thu Apr 25 15:41:52 GMT 2024

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

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

Back to the top