Bug 335733 org.eclipse.e4.ui.workbench.addons.swt has dependency on org.eclipse.ui
This means when one wants to use it one has to get in the compat layer: * minmax: Can be fixed quite easily because it only uses some ID stuff from IPageLayout and one WorkbenchImages-call => Proposal fix them and leave it in e4.ui.workbench.addons.swt * perspectiveswitcher: Looks like this is harder to fix because it usies all sorts of Workbench-Classes => Proposal move it to compat layer
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java
}
		return null;
	}
	private MPart getPart(MStackElement element) {
		if (element instanceof MPart) {
			return (MPart) element;
		}
		return (MPart) ((MPlaceholder) element).getRef();
	}
	private void updateTrimStackItems() {
		
		if (trimStackTB == null || trimStackTB.isDisposed())
			return;
		if (minimizedElement instanceof MPlaceholder) {
			if (trimStackTB.getItemCount() == 1) {
				ToolItem ti = new ToolItem(trimStackTB, SWT.PUSH);
				ImageDescriptor desc = WorkbenchImages
						.getImageDescriptor(IWorkbenchGraphicConstants.IMG_ETOOL_NEW_PAGE);
				ti.setImage(desc.createImage());
				ti.addSelectionListener(new SelectionListener() {
					public void widgetSelected(SelectionEvent e) {
						showStack(!isShowing);
						ToolItem item = (ToolItem) e.widget;
						item.setSelection(isShowing);
					}
					public void widgetDefaultSelected(SelectionEvent e) {
						showStack(!isShowing);
						ToolItem item = (ToolItem) e.widget;
						item.setSelection(isShowing);
					}