Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Class cast from ISelection to IStructuredSelection in IObjectActionDelegate.selectionChanged()
Class cast from ISelection to IStructuredSelection in IObjectActionDelegate.selectionChanged() [message #451452] Wed, 02 March 2005 10:53 Go to next message
Eclipse UserFriend
Hello,

When contributing to a popup menu extension point with an object
contribution, method IObjectActionDelegate.selectionChanged(IAction
action, ISelection selection) is called every time the user selects or
deselects an item in the visible part.

My question is how to identify the item on which the popup menu was
invoked. I know that in case of a tree, I can do a class cast from
ISelection to IStructuredSelection and get it from there.
The point is I cannot find any documentation that this class cast is
valid. Can someone point me to the right place in the documentation?

Thanks

Christoph
Re: Class cast from ISelection to IStructuredSelection in IObjectActionDelegate.selectionChanged() [message #451455 is a reply to message #451452] Wed, 02 March 2005 11:12 Go to previous message
Eclipse UserFriend
You will get a better response to questions about the UI platform (such as
Actions) in the eclipse.platform newsgroup:

news://news.eclipse.org/eclipse.platform


"Christoph Czernohous" <cc@de.ibm.com> wrote in message
news:d04nib$ec9$1@www.eclipse.org...
> Hello,
>
> When contributing to a popup menu extension point with an object
> contribution, method IObjectActionDelegate.selectionChanged(IAction
> action, ISelection selection) is called every time the user selects or
> deselects an item in the visible part.
>
> My question is how to identify the item on which the popup menu was
> invoked. I know that in case of a tree, I can do a class cast from
> ISelection to IStructuredSelection and get it from there.
> The point is I cannot find any documentation that this class cast is
> valid. Can someone point me to the right place in the documentation?
>
> Thanks
>
> Christoph
Previous Topic:Context menus for default editors
Next Topic:TableViewer SWT.VIRTUAL
Goto Forum:
  


Current Time: Sat Jul 05 07:28:05 EDT 2025

Powered by FUDForum. Page generated in 0.26841 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top