Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BPMN Modeler » Selection Listener
Selection Listener [message #1923] Thu, 09 October 2008 11:26 Go to next message
Till Essers is currently offline Till EssersFriend
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 12:04 Go to previous message
Eclipse UserFriend
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: Tue Mar 19 02:41:55 GMT 2024

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

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

Back to the top