Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Link Views and Editors
Link Views and Editors [message #463237] Wed, 07 February 2007 10:22 Go to next message
Michael is currently offline MichaelFriend
Messages: 43
Registered: July 2009
Member
I want to pass some information on to a view every time the mouse moves over an editor. I think this means I add a mouse listener to the editor composite and inside this listener, make a call to the view.

- But how do I get a reference to the view I want information sent to?
- Do I add the listener as part of the editor's creation or as part of the view's creation?

Michael
Re: Link Views and Editors [message #463280 is a reply to message #463237] Wed, 07 February 2007 18:33 Go to previous message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
You can get a reference to the view using :
IWorkbenchPage page =
PlatformUI.getWorkbench().getActiveWindow().getActivePage();
IViewPart viewPart = page.findView(YOUR_VIEW_ID);

You should add a listener to the editor's createPartControl (and, of
course, remove it in the dispose method).

Snjeza

Michael wrote:
> I want to pass some information on to a view every time the mouse moves over an editor. I think this means I add a mouse listener to the editor composite and inside this listener, make a call to the view.
>
> - But how do I get a reference to the view I want information sent to?
> - Do I add the listener as part of the editor's creation or as part of the view's creation?
>
> Michael
Previous Topic:Editor part listener
Next Topic:Listening to file changes outside the workspace
Goto Forum:
  


Current Time: Fri Oct 04 14:43:06 GMT 2024

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

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

Back to the top