[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Perspective customization questions

Mark Powell wrote:
Hi group,

There's a couple of things that I'd like to do with my RCP app that aren't yet obvious to me how to do or even if there's a way to do. Both things are in the area of customization of how the perspective selection toolbar appears when you first launch the application.

First, I'd like to programmatically be able to turn off the text next to the perspective icons. I want this behavior to be the default behavior for my app.

Second, I'd like to put the icons for all of the perspectives that I define in the toolbar by default. I don't want the user to have to "Show perspective" to get each one for the first time, or even to use the short-list menu to get one for the first time. I want the button for each perspective visible the from the first moment they see the workbench appear.

I use following solution in my rcp, through looks foolish, but works

@Override
 public void postWindowOpen(IWorkbenchWindowConfigurer configurer) {
        super.postWindowOpen(configurer);
        IWorkbench wb = configurer.getWindow().getWorkbench();
        try {
        	wb.showPerspective("PerspectiveA.Id",configurer.getWindow());
wb.showPerspective("PerspectiveB.Id",configurer.getWindow());
wb.showPerspective("PerspectiveDefault",configurer.getWindow());
        } catch (WorkbenchException e) {
         e.printStackTrace();
        }
    }



Thanks in advance for any advice or information about whether the platform API currently supports/would be able to support these desirements.

Mark Powell
JPL