Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » NullPointerException in SetPerspective
NullPointerException in SetPerspective [message #870993] Thu, 10 May 2012 09:40 Go to next message
Eclipse UserFriend
Hola,

I'm using Indigo and JavaSE 1.6 to create a Rap app.

I created an additional plugin which defines a new Perspective.

In the ApplicationWorkbenchWindowAdvisor of the main plugin, the configurer.setShowPerspectiveBar is set to true.

In Run Configurations I added/selected the new bundle.

When I try to switch to the new perspective, i got the following error.

Am I missing something?


java.lang.NullPointerException
	at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3715)
	at org.eclipse.ui.handlers.ShowPerspectiveHandler.openPerspective(ShowPerspectiveHandler.java:146)
	at org.eclipse.ui.handlers.ShowPerspectiveHandler.openOther(ShowPerspectiveHandler.java:118)
	at org.eclipse.ui.handlers.ShowPerspectiveHandler.execute(ShowPerspectiveHandler.java:57)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:306)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:167)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:239)
	at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:155)
	at org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:169)
	at org.eclipse.rap.internal.design.example.builder.PerspectiveSwitcherBuilder$2.widgetSelected(PerspectiveSwitcherBuilder.java:158)
	at org.eclipse.swt.events.SelectionEvent.dispatchToObserver(SelectionEvent.java:196)
	at org.eclipse.rwt.internal.events.Event.processEvent(Event.java:44)
	at org.eclipse.swt.events.TypedEvent.processEvent(TypedEvent.java:161)
	at org.eclipse.swt.events.TypedEvent.executeNext(TypedEvent.java:201)
	at org.eclipse.swt.widgets.Display.runPendingMessages(Display.java:1143)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1133)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2733)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2694)
	at org.eclipse.ui.internal.Workbench.access$5(Workbench.java:2530)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:702)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:685)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:157)
	at org.vsoft.vmenu.web.Application.start(Application.java:18)
	at org.eclipse.rap.ui.internal.application.EntrypointApplicationWrapper.createUI(EntrypointApplicationWrapper.java:25)
	at org.eclipse.rwt.internal.lifecycle.EntryPointManager.createUI(EntryPointManager.java:81)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWTLifeCycle.java:204)
	at org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadController.run(RWTLifeCycle.java:88)
	at java.lang.Thread.run(Thread.java:636)
	at org.eclipse.rwt.internal.lifecycle.UIThread.run(UIThread.java:101)



Re: NullPointerException in SetPerspective [message #872254 is a reply to message #870993] Tue, 15 May 2012 15:19 Go to previous messageGo to next message
Eclipse UserFriend
Hola Hugo,

our demo bundle org.eclipse.rap.demo contains different perspectives.
The bundle org.eclipse.rap.demo.databinding contributes another
perspective. Maybe you can spot the difference between your application
and this demo? Have you tried your application with RCP?

Saludos, Ralf

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: NullPointerException in SetPerspective [message #876059 is a reply to message #872254] Wed, 23 May 2012 16:31 Go to previous messageGo to next message
Eclipse UserFriend
Hola Ralf,

thanks for your response.

I did another try with a simple sample and it worked.

I will dig a little bit more on mine.

Gracias!
Re: NullPointerException in SetPerspective [message #886766 is a reply to message #876059] Fri, 15 June 2012 11:41 Go to previous messageGo to next message
Eclipse UserFriend
Hola Hugo,

did you find out something more on this issue?

thanks,
Agnes
Re: NullPointerException in SetPerspective [message #910662 is a reply to message #886766] Mon, 10 September 2012 03:08 Go to previous message
Eclipse UserFriend
Hi,

Had the same issue (rap version 1.5).
Helped to add configurer.setShowCoolBar(true) to resolve the issue.
public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {

	public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
		super(configurer);
	}

	@Override
	public void preWindowOpen() {
		IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
		// some how cool bar is required for rap to switch perspectives,
		// otherwise - NPE
		configurer.setShowCoolBar(true);
		
.....

[Updated on: Mon, 10 September 2012 03:09] by Moderator

Previous Topic:Java to Java script conversion
Next Topic:[ANN] RAP 1.5M7 published, API changes
Goto Forum:
  


Current Time: Mon Jun 16 10:04:06 EDT 2025

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

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

Back to the top