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

Hi Dave, 

Try these as a starting point: 


PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPerspectiveListener(listener); 
PlatformUI.getWorkbench()..getEditorRegistry() 

Best regards, 

Wim Jongman 

> Remy Suen wrote: 
> 
>> On Fri, 04 Sep 2009 16:06:30 +0000, Dave wrote: 
>>> Is there a recommendation as to where/when (i.e., 
>>> class/method, listener event, etc.) to hide the editors, and where/when 
>>> to re-show them? 
> 
>> The simplest thing to do would be to just react to perspective events and 
>> show/hide your editors. 
> 
>>> So how do I get the list of hidden 
>>> editors that I want to re-show when a perspective is being re-shown? 
> 
>> You need to keep track of what you've shown/hidden yourself and what you 
>> want to show/hide the next time the perspective changes. This is up to 
>> the client to decide. 
> 
>> Regards, 
>> Remy 
> 
> 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