[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: ContextMenuProvider + selected editParts

Guy,

Yes - I'm currently using that route, I was just wondering whether the list of selected edit parts was scoped over the ContextMenuProvider.

Thanks anyway.

James

Guy Slade wrote:

What about selectionAction.getSelectedObjects(). This gives you a list of the selected edit parts. The calculateEnabled() method of your action(s) can use this to decide if they are enabled or not.

Guy

James Willans wrote:

Is it possible to know which editparts are selected in a ContextMenuProvider? I want to be able to calculate which menus to show based on this knowledge. Note that there is not enough information in the SelectionAction since I need the set of (enabled) actions and the set of selected edit parts.

Thanks.

James