Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How to get or create the PerspectiveSwitcher Bar?
How to get or create the PerspectiveSwitcher Bar? [message #117211] Sat, 27 December 2008 13:23
CAO Dahai is currently offline CAO DahaiFriend
Messages: 16
Registered: July 2009
Junior Member
I use PerspectiveSwitcher to create default Perspective bar in my
ApplicationWorkbenchWindowAdvisor#createWindowContents(final Shell shell),
and my code is :

if (getWindowConfigurer().getShowPerspectiveBar()) {
perspectiveSwitcher = new PerspectiveSwitcher(getWindowConfigurer()
.getWindow(), banner, perspectiveBarStyle());
perspectiveSwitcher.createControl(shell);
}

But the exception occurs :

java.lang.NullPointerException
at
org.eclipse.ui.internal.PerspectiveSwitcher.createControlFor Location(PerspectiveSwitcher.java:511)
at
org.eclipse.ui.internal.PerspectiveSwitcher.setPerspectiveBa rLocation(PerspectiveSwitcher.java:320)
at
org.eclipse.ui.internal.PerspectiveSwitcher.createControl(Pe rspectiveSwitcher.java:232)

the position is at line: getTrimManager().removeTrim(this);
getTrimManager() is null.

I found that I have no any way to set the TrimManager. How can create the
default Perspective bar without null pointer exception?

thank you!

Dahai CAO
Previous Topic:How to run RCP Application in the browser?
Next Topic:Undefined key: 'text.SINGLE.padding' in theme 'RAP Default Theme'
Goto Forum:
  


Current Time: Sat Nov 09 03:15:13 GMT 2024

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

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

Back to the top