Help with edit policies [message #245524] |
Tue, 16 September 2008 05:39  |
Eclipse User |
|
|
|
I have a GEF viewer contained in a graphical editor. It is showing the contents of a database, and has a figure for each entry. It
looks much like a directory listing when showing icons. I have an edit part which overrides performRequest to catch the double
click to handle REQ_OPEN, this causes another view to open. So far so good.
I don't have a palette on the viewer.
The problem comes when I want to be able to select a single figure and change it's appearance. I have tried installing an edit
policy SELECTION_FEEDBACK_ROLE, extending SelectionEditPolicy, this has no effect at all. I see the policy installed via the edit
part, but no call to activate or deactivate of the policy is made, let alone to hide or show the selection feedback.
I thought it maybe due to no active tool being set so in the configureGraphicalViewer method I added a edit domain set active tool
to new SelectionToolEntry().createTool;
This again makes no difference, what is the magic switch I have forgotten to flick? The viewer seems to react to nothing but the
edit parts performRequest REQ_OPEN request.
The viewer is connected into the workbench selection mechanism.
I have tried various other ROLES and edit policies, it's just not listening!!
Any ideas?
/Dominic
|
|
|
|
|
Re: Help with edit policies [message #245711 is a reply to message #245533] |
Tue, 30 September 2008 15:11  |
Eclipse User |
|
|
|
Originally posted by: shady_86.sify.com
i will tell you two things which can help
1. check the methods decorateChild in the LayoutEditPolicy which is the super class of your xylayout edit policy.
this decorate child method install the primary drag role, because of which those handles on the edit part are created, this edit policy is actually ResizazbleEditPolicy.
Now these handles are also created on handle layer so by putting proper break points you can figure out from where the ghost images are created.
2. when you create the scalable root edit part in your editor class, go inside that class, there all the layers are created one after another including the handle layer, put some break points there also..,
|
|
|
Powered by
FUDForum. Page generated in 0.02893 seconds