Dynamic Menus, Handlers and passing variables application context [message #493173] |
Fri, 23 October 2009 09:25  |
Eclipse User |
|
|
|
I've done a bunch of searches looking for an example of what I am doing and
have come up empty so I'm pretty sure I'm doing something wrong or missing
some fundamental step.
Background Info:
I have a View, containing a TreeViewer with multiple columns. I'm populating
the pop-up menu depending on which column gets clicked on. Currently, I have
defined a dynamic menu in the plugin.xml which uses my view and
current mouse location and getCell() to get the objects contained in the
cell to populate the menu. However I need to pass that object to the handler
After many searches I discovered the proper way to pass complex objects
to the handler is via the application context. However in my case I am
not sure how to do this.
Questions:
Is using a dynamic menu defined in plugin.xml the proper approach to my problem? Should I be solving my problem some other way?
When using dynamic menu contributions how can you execute commands
programatically (so I can add variables)?
Should I be doing this all in code in the view instead?
And more generally, when do you define commands and handlers in plugin.xml
and when should you do things in code.
Any guidance is appreciated
Kyle
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06862 seconds