Bug 320814 Minimized stacks are 'restored' on shutdown
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/TrimStack.java
/**
	 * @return
	 */
	private MPartStack findStack() {
		List<MPerspectiveStack> ps = modelService.findElements(window, null,
				MPerspectiveStack.class, null);
		if (ps.size() == 0) {
			String toolControlId = toolControl.getElementId();
			int index = toolControlId.indexOf('(');
			String stackId = toolControlId.substring(0, index);
			theStack = (MPartStack) modelService.find(stackId, window);
		} else {
			String toolControlId = toolControl.getElementId();
			int index = toolControlId.indexOf('(');
			String stackId = toolControlId.substring(0, index);
			String perspId = toolControlId.substring(index + 1, toolControlId.length() - 1);
			MPerspective persp = (MPerspective) modelService.find(perspId, ps.get(0));
			if (persp != null) {
				theStack = (MPartStack) modelService.find(stackId, persp);
			}
		}
		return theStack;
	}
	private void updateTrimStackItems() {
		
		if (trimStackTB == null || trimStackTB.isDisposed())
			return;
		CTabFolder ctf = (CTabFolder) theStack.getWidget();
		if (ctf == null)
			return;