Community
Participate
Working Groups
Build Identifier: 20110218-0911 See bug 254936. This issue is very similar, except the NPE now occurs due to "mgr.getControl2()" returning null (mgr was not null). java.lang.NullPointerException at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3721) at org.eclipse.ui.handlers.ShowPerspectiveHandler.openPerspective(ShowPerspectiveHandler.java:146) ... Reproducible: Always Steps to Reproduce: See steps to reproduce in bug 254936, my setup is the same.
I found a workaround, but it is very kludgy. I assume that the reason I ran into this bug is because I am not using the menu bar, choosing instead something with a multi-level bar. Within my extension of WorkbenchWindowAdvisor.preWindowOpen(), I call configurer.setShowCoolBar(false); But this isn't good enough. At some point, a coolbar manager is created, and then this NPE comes up when it's asked about its control. So, within my override of createWindowContents(), I added one line: configurer.createCoolBarControl(shell); This doesn't make me comfortable, but seems to get through my issue. If configurer.setShowCoolBar(false) is set, shouldn't a coolbarManager not get created?
Thank you very much!!!!!!! Thank you... Thank you... because of your reply, I can solve my problem. Wow... your are my hero. T T
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the stalebug whiteboard tag.