Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Catch the editor open event
Catch the editor open event [message #462188] Wed, 24 January 2007 06:26 Go to next message
Eclipse UserFriend
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 #462195 is a reply to message #462188] Wed, 24 January 2007 07:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I doubt if it is possible with RCP.
org.eclipse.ui.IPartListener2 could help but it notifies only after the
part is opened.

If it is possible in your case I would implement own "editor opener".


Ilya Shinkarenko
--
www.rcp-training.com
www.weiglewilczek.com


Carsten Spieker wrote:
> 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 Go to previous message
Eclipse UserFriend
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")){
Previous Topic:How can I specify my own perspective as my RCP's default perspective?
Next Topic:Saving layout
Goto Forum:
  


Current Time: Tue Jun 17 01:43:21 EDT 2025

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

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

Back to the top