[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Associate Editor with Perspective

Dave wrote on Fri, 04 September 2009 14:17
Thanks for your help. I'm a novice when it comes to Eclipse RCP development, so I was wondering if you could point me in the right direction. What is the recommended way for me to set it up so that I can react to perspective events? In other words, do I add a listener to something? If so, what type of listener, what would I be adding it to, and when would I add it? (i.e., during workbench initialization? workbench page initialization? what classes/methods represent those actions in the workbench lifecycle anyway?)

Also, is there a method I can call that will return all of the open editors, including hidden ones?

Thanks again for being patient with me!

Regards,
Dave


This API was added for the most hard-core of hard-core RCP developers.  It is not how we recommend using editors and the editor areas (the questions you've posted are just the beginning, believe me :)

That being said, I would consider writing your editor+perspective management code in its own plugin.  Try and limit what else it does, and then to get the behaviour your want (in a RCP app) you would look at starting up your management functionality in your workbench advisor (it has post startup methods).

You need to listen to callbacks in the IPerspectiveListener* methods, and you might even need an IPartlListener2 listener in order to tell when editors are opened/closed.


PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions