Catch the editor open event [message #462188] |
Wed, 24 January 2007 06:26  |
Eclipse User |
|
|
|
Hi,
is it possible to access the point where an editor gets opened.
I want to be informed if the IWorkbenchPage.openEditor(*) method is invoked
and I want to
take influence to the code BEFORE the editor is loaded, even before the
editor plugin is loaded (if it is an external one).
Is this possible with some kind of listener or something else?
Thanks in advance
Greetz,
Carsten
|
|
|
|
Re: Catch the editor open event [message #462377 is a reply to message #462195] |
Sun, 28 January 2007 04:40  |
Eclipse User |
|
|
|
You could use the PerspectiveAdapter - i use it to cathch the editor open event - to open another view. It works, but the problem
begins, when i try to catch the "editorClose" event - but u didn't say u need it, so maybe this code will help:
perspectiveAdapter = new PerspectiveAdapter(){
@Override
public void perspectiveChanged(
final IWorkbenchPage page,
IPerspectiveDescriptor perspective,
IWorkbenchPartReference partRef,
String changeId) {
// editor is opened if(changeId.equalsIgnoreCase("editorOpen")){
|
|
|
Powered by
FUDForum. Page generated in 0.03948 seconds