Bug 340465 Remove CTabFolder/CTabItem references from the TrimStack
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java
MPerspective persp = (MPerspective) modelService.find(perspId, ps.get(0));
			if (persp != null) {
				minimizedElement = modelService.find(stackId, persp);
			} else {
				minimizedElement = modelService.find(stackId, window);
			}
		}
		return minimizedElement;
	}
	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);
					}