Retrieving the SourceProvider [message #990389] |
Wed, 12 December 2012 09:31 |
Cedric Moonen Messages: 274 Registered: August 2009 |
Senior Member |
|
|
Hello,
I'm building an RCP application based on Eclipse Indigo.
In my application, I have a view which holds a custom widget (covering the full view) for which I want a pop-up menu. I defined this pop-up menu in my plugin.xml and for two of the commands in the menu, I need to enable/disable them depending on some state of my custom widget: the widget is a list of columns representing elements and I need to check if the mouse is over one of the column and retrieve the selection state of the elements in the column (the menu entries are select all/deselect all handlers).
However, my problem is that I don't know exactly how I can write a core expression for that, since I don't want to tie my source provider to my view (since the view can be closed and reopened).
Thus, I was thinking of doing it the other way around: that the view could retrieve the source provider and let it know when the mouse hovered over another column (and specifies whether the elements can be selected/deselected).
How can I achieve something like this ? Or is there a better approach to the problem ?
Thanks
|
|
|
Powered by
FUDForum. Page generated in 0.13745 seconds