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
if (minimizedElement instanceof MPartStack)
			createPopupMenu();
		ToolItem restoreBtn = new ToolItem(trimStackTB, SWT.PUSH);
		restoreBtn.setImage(getRestoreImage(parent.getDisplay()));
		restoreBtn.addSelectionListener(new SelectionListener() {
			public void widgetSelected(SelectionEvent e) {
				minimizedElement.getTags().remove(MinMaxAddon.MINIMIZED);
			}
			public void widgetDefaultSelected(SelectionEvent e) {
				minimizedElement.getTags().remove(MinMaxAddon.MINIMIZED);
			}
		});
		updateTrimStackItems();
	}
	/**
	 * @return
	 */
	private MUIElement findElement() {
		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);
			minimizedElement = (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);