I'm using GEF. I have a graphical editor with some "boxes" implemented. Now, I want to add a double-click listener to each box (Rectangle). I tried to add a listener to the GraphicalViewer but it did not work.
相关问题
- Eclipse and Mylyn : how to disable grey files in t
- Installing Pydev for Eclipse throws error
- Error in Scala Compiler: java.lang.AssertionError:
- How to remove unused imports using Eclipse and not
- Assume/switch role in aws toolkit for eclipse 2.0
相关文章
- selenium+eclipse 打开网页时报错
- Eclipse failing to open
- Eclipse how can I indent C++ preprocessor macros
- Why is FindBugs ignoring my check for null?
- Eclipse cleanup - what are the “.index” files - ca
- Eclipse plugin to find out unused methods in a cla
- Spring NamespaceHandler issue when launching Maven
- Google USB Package isn't showing in SDK Manang
I am not familiar with GEF myself, however I found this in documentation:
In the
GraphicalEditPart
of the "box" for which you want to add the listener, you have to override theperformRequest(Request req)
method. When the framework identifies a double-click on the part's figure, it calls this method with a request that hasreq.getType()==RequestConstants.REQ_OPEN
. You can take over from here. Complete code to test that his works:Hope this does the trick.