FocusListener for Diagrams? [message #774224] |
Tue, 03 January 2012 09:46  |
Eclipse User |
|
|
|
Hello everyone,
I have a TreeViewer that needs to filter its contents according to the currently displayed Diagram (more precisely, the linked BOs). Therefore, it needs to be notified when the user switches focus between open Diagrams. Can anyone point me in the right direction on how to achieve this?
Regards,
Stefan
|
|
|
|
|
Re: FocusListener for Diagrams? [message #777379 is a reply to message #777374] |
Tue, 10 January 2012 06:19  |
Eclipse User |
|
|
|
Hi Stefan,
you need to register your editor to the Eclipse org.eclipse.ui.editors
extension point. After that you will be able to use the Eclipse methods with
your editor ID to open your editor, e.g.:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input,
editorId)
Regarding the warning: currently there's no other way, as the editor is not
part of the API. For our Juno version we reworked that part, so the usecase
is now supported via official APIs.
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.03239 seconds