|Dynamic Menus, Handlers and passing variables application context [message #493173]
||Fri, 23 October 2009 09:25
| Kyle Girard
Registered: October 2009
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.
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.
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
Powered by FUDForum
. Page generated in 0.01700 seconds