|
Re: Selection Listener [message #1938 is a reply to message #1923] |
Thu, 09 October 2008 12:04 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: atoulme.intalio.com
Till Essers wrote:
> Hi
>
> I know it's a real newbie question, but I'm some kind of helpless right
> now.
> How can I get notified when there is an object selected in the
> DiagramEditor?
>
> Sorry in advance :/
> Till
See IPartListener, and grab the current IWorkbenchWindow, either through
the editor site or by asking the active workbench window
site.getWorkbenchWindow().getSelectionService().addSelection Listener(myListener);
or
PlatformUI.getWorkbench().getActiveWorkbenchWindow().addSele ctionListener(myListener);
You will have to filter the selection to only listen to the selections
occurring in your editor.
FWIW This works with any editor or part.
Thanks,
Antoine
|
|
|
Powered by
FUDForum. Page generated in 0.04039 seconds