Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Link Views and Editors
Link Views and Editors [message #463237] Wed, 07 February 2007 05:22 Go to next message
Eclipse UserFriend
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 13:33 Go to previous message
Eclipse UserFriend
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: Sun Jul 13 21:41:41 EDT 2025

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

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

Back to the top