Bug 333081 Elements in the shared area gets displayed when switching to a perspective that shouldn't show the area
After the perspective dialog is closed, it seems that the system tries to grant activation to the active part again before the switch actually happens. We enqueue such a request and then perform the perspective switch. When the switch is complete, we process the original activation request and since the element is found in the active perspective, we try to activate it. We should instead also check whether the element or its parents should be rendered in the current perspective before we make such an activation request.
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
/*******************************************************************************
 * Copyright (c) 2008, 2010 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.e4.ui.workbench.renderers.swt;
import java.util.LinkedList;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;