Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329184

Summary: Detached view that is an activation target candidate can prevent perspective switching
Product: [Eclipse Project] e4 Reporter: Remy Suen <remy.suen>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: major    
Priority: P3    
Version: 1.0   
Target Milestone: 4.1 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
EPartService patch v1 none

Description Remy Suen CLA 2010-11-01 08:07:01 EDT
1. Detach the 'Outline' view.
2. Window > Open Perspective > Debug
3. Window > Open Perspective > Java
4. The perspective switch doesn't actually happen. You see the 'Debug' perspective's content with an 'Outline' view detached.

Closing the 'Outline' view in the 'Debug' perspective will workaround this problem.
Comment 1 Remy Suen CLA 2010-11-01 10:22:30 EDT
java.lang.NullPointerException
	at org.eclipse.e4.ui.internal.workbench.PartActivationHistory.isValid(PartActivationHistory.java:101)
	at org.eclipse.e4.ui.internal.workbench.PartActivationHistory.isValid(PartActivationHistory.java:128)
	at org.eclipse.e4.ui.internal.workbench.PartActivationHistory.isValid(PartActivationHistory.java:128)
	at org.eclipse.e4.ui.internal.workbench.PartActivationHistory.isValid(PartActivationHistory.java:128)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.switchPerspective(PartServiceImpl.java:405)
	at org.eclipse.e4.ui.workbench.renderers.swt.PerspectiveStackRenderer.showTab(PerspectiveStackRenderer.java:114)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:74)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:41)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:73)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:143)
	at org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl.setSelectedElement(PerspectiveStackImpl.java:1)
	at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:2499)
	at org.eclipse.ui.handlers.ShowPerspectiveHandler.openPerspective(ShowPerspectiveHandler.java:146)
	at org.eclipse.ui.handlers.ShowPerspectiveHandler.execute(ShowPerspectiveHandler.java:61)
Comment 2 Remy Suen CLA 2010-11-01 10:41:32 EDT
Created attachment 182143 [details]
EPartService patch v1
Comment 3 Remy Suen CLA 2010-11-01 10:44:31 EDT
(In reply to comment #2)
> Created an attachment (id=182143) [details]
> EPartService patch v1

Fix released to CVS HEAD.
Comment 4 Remy Suen CLA 2010-12-07 10:40:25 EST
Verified with I20101207-0250 on Windows XP.