Double-click on whitespace/canvas [message #524370] |
Wed, 31 March 2010 16:43 |
Iliyana Ivanova 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
|
|
|
Powered by
FUDForum. Page generated in 0.02893 seconds