Bug 318363 [UI] Closing Perspectives changes others
If you open the Debug perspective and then close it the Package Explorer disappears. Root cause was that I opened the second perspective using the perspective switcher which performed the operation 'locally' rather than going through the WorkbenchPage#setPerspective code. This meant that the 'openPerspectives' list wasn't updated which meant that the 'closePerspective' call delegated to 'closeAllPerspectives' since it thought there was only one open.
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java
if (psItem != null) {
			psItem.dispose();
		}
		
		psTB.pack();
		psTB.getShell().layout(new Control[] { psTB }, SWT.DEFER);
	}
	protected ToolItem getItemFor(MPerspective persp) {
		if (psTB == null)
			return null;
		for (ToolItem ti : psTB.getItems()) {
			if (ti.getData() == persp)
				return ti;
		}
		return null;
	}
	void paint(PaintEvent e) {
		GC gc = e.gc;
		Point size = comp.getSize();
		Color border1 = borderColor;
		int h = size.y;
		int[] simpleCurve = new int[] { 0, h - 1, 1, h - 1, 2, h - 2, 2, 1, 3, 0 };
		
		gc.setForeground(border1);
		gc.setAntialias(SWT.ON);
		gc.drawPolyline(simpleCurve);
		Rectangle bounds = ((Control) e.widget).getBounds();
		bounds.x = bounds.y = 0;
		Region r = new Region();
		r.add(bounds);