Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BPMN Modeler » Selection Listener
Selection Listener [message #1923] Thu, 09 October 2008 07:26 Go to next message
Till Essers is currently offline Till Essers
Messages: 92
Registered: July 2009
Member
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
Re: Selection Listener [message #1938 is a reply to message #1923] Thu, 09 October 2008 08:04 Go to previous message
Eclipse User
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
Previous Topic:Initialize diagram from model file
Next Topic:connecting object
Goto Forum:
  


Current Time: Sat Aug 30 10:34:45 EDT 2014

Powered by FUDForum. Page generated in 0.09074 seconds