Bug 320243 Closing last view of a minimized stack makes the stack in an unstable state
I20100718-2237 1. Minimize the 'Package Explorer'. 2. Show it by clicking its icon in the trim. 3. Close it. 4. Notice that it still shows up in the trim. 5. Click on the icon. 6. An SWTException occurs. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:4083) at org.eclipse.swt.SWT.error(SWT.java:3998) at org.eclipse.swt.SWT.error(SWT.java:3969) at org.eclipse.swt.widgets.Widget.error(Widget.java:468) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:340) at org.eclipse.swt.widgets.Widget.getData(Widget.java:554) at org.eclipse.e4.ui.workbench.addons.minmax.TrimStack$9.widgetSelected(TrimStack.java:308)
bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/minmax/MinMaxAddon.java
import org.eclipse.e4.ui.widgets.CTabFolder;
import org.eclipse.e4.ui.widgets.CTabFolder2Adapter;
import org.eclipse.e4.ui.widgets.CTabFolderEvent;
import org.eclipse.e4.ui.workbench.UIEvents;
import org.eclipse.e4.ui.workbench.UIEvents.EventTags;
import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.IPageLayout;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
/**
 * Addon supporting standard drag and drop management
 */
public class MinMaxAddon {
	private static String trimURI = "platform:/plugin/org.eclipse.e4.ui.workbench.addons.swt/org.eclipse.e4.ui.workbench.addons.minmax.TrimStack"; 
	static String ID_SUFFIX = "(minimized)"; 
	
	public static String MINIMIZED = "Minimized"; 
	public static String MINIMIZED_BY_ZOOM = "MinimizedByZoom"; 
	public static String EA_MAXIMIZED = "EAMaximized"; 
	@Inject
	IEventBroker eventBroker;
	@Inject
	EModelService modelService;
	private EventHandler ctfListener = new EventHandler() {