Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Catch the editor open event
Catch the editor open event [message #462188] Wed, 24 January 2007 11:26 Go to next message
Carsten Spieker is currently offline Carsten SpiekerFriend
Messages: 197
Registered: July 2009
Senior Member
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 12:09 Go to previous messageGo to next message
Ilya Shinkarenko is currently offline Ilya ShinkarenkoFriend
Messages: 22
Registered: July 2009
Junior Member
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 09:40 Go to previous message
Natan Fastovsky is currently offline Natan FastovskyFriend
Messages: 6
Registered: July 2009
Junior Member
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: Wed Sep 11 21:08:06 GMT 2024

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

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

Back to the top