CNF : tool bar actions [message #521700] |
Thu, 18 March 2010 10:08  |
Eclipse User |
|
|
|
Hi,
I am using CNF to define my own view : this view is synchronized with
another view which represents a diagram editor. When the focus on the
diagram editor, i have access to many buttons in the tool bar (like
save, undo, redo...). When i focus on the diagram editor and after on
another view, i always have access to the the same actions in the tool
bar because these are the diagram editor actions. But when i focus to my
CNF view, i do not have access to these tool bar actions as if the CNF
view reinitialize the actions.
Is it possible that the CNF view do not do that and keep the actions of
the diagram editor ?
Thanks,
Nathalie Lepine
|
|
|
Re: CNF : tool bar actions [message #521817 is a reply to message #521700] |
Thu, 18 March 2010 15:24  |
Eclipse User |
|
|
|
Yes, you can do this using the action providers extension points and implementing CommonActionProviders which can update their state based on the selection in your CN view.
There are several action provides implemented for the Project Explorer in the org.eclipse.ui.navigator.resources.actions package and these case be used as a place to start.
Another way you can do this is to use the Commands infrastructure to enable the handlers for some of these actions based on an enablement expression that considers the view (your viewpart id) and the current selection. But I'm a little fuzzy on how to do that. I suggest you read about commands and if it's not clear post something that will get Paul Webster's attention and he can help you further.
|
|
|
Powered by
FUDForum. Page generated in 0.04571 seconds