Community
Participate
Working Groups
Build Identifier: Rap 1.3 Using the business demo theme and disable the coolbar raises a NullPointerException. java.lang.NullPointerException at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3562) at org.eclipse.ui.handlers.ShowPerspectiveHandler.openPerspective(ShowPerspectiveHandler.java:152) at org.eclipse.ui.handlers.ShowPerspectiveHandler.openOther(ShowPerspectiveHandler.java:124) at org.eclipse.ui.handlers.ShowPerspectiveHandler.execute(ShowPerspectiveHandler.java:63) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:274) 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:245) 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:156) Reproducible: Always Steps to Reproduce: 1. Disable the Coolbar 2. Switch the Perspective
Patrick, could you provide a snippet that demonstrate the problem? Could you test your code in RCP? Does it work there?
It's a problem using the rap demo business theme. I don't know how to test this in RCP. @Override public void preWindowOpen() { final IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); final Rectangle bounds = Display.getDefault().getBounds(); configurer.setInitialSize(new Point(bounds.width, bounds.height)); configurer.setShowCoolBar(false); configurer.setShowStatusLine(true); configurer.setShowFastViewBars(false); configurer.setShowPerspectiveBar(false); configurer.setShowProgressIndicator(false); configurer.setShellStyle(SWT.NO_TRIM); } The coolbar will not be initialized. This is the reason for the NPE. This is the code that raises the exception: getClientComposite().setRedraw(true); mgr.getControl2().setRedraw(true); The Control2 is the coolbar.
Hi Patrick, this is a bug in the original workbench code. See bug 254936. It has been fixed in Workbench 3.5, but RAP is still based on Workbench code 3.4. This should be fixed as part of Workbench code update to 3.7 ( see bug 309661 ).
Fixed with bug 309661.