|
Re: Perspective customization questions [message #432111 is a reply to message #431971] |
Tue, 31 May 2005 17:03 |
Nick Edgar Messages: 439 Registered: July 2009 |
Senior Member |
|
|
Hi Mark,
Mark Powell wrote:
> 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.
See http://eclipse.org/rcp/faq.html#customPrefs
and specify the following in the perspective_customization.ini file:
org.eclipse.ui/SHOW_TEXT_ON_PERSPECTIVE_BAR=false
Doing it this way is preferable to changing the value programmatically,
since it allows different product entry points to have different
defaults. Of course, you may still allow the user to change the value
by using:
PlatformUI.getPreferenceStore().
setValue(IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECT IVE_BAR, x);
> 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.
This is not currently well supported, but is something I'd like to
address for 3.2. See the following for a workaround:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=84226
Another approach is to use a custom window layout, with your own button
bar for switching between some well-known perspectives, rather than
using the built-in perspective bar. See
WorkbenchWindowAdvisor.createWindowContents(Shell).
HTH,
Nick
|
|
|
Re: Perspective customization questions [message #432155 is a reply to message #431971] |
Fri, 03 June 2005 15:14 |
nielinjie Messages: 13 Registered: July 2009 |
Junior Member |
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03116 seconds