Bug 323046 SWTException thrown when showing context menu on an editor tab after having shown it in another window that's been closed
1. Open a file. 2. Right-click on the tab > Close 3. Window > New Window 4. Go back to the original window. Close it. 6. Open a file. 7. Right-click on the tab. 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.setData(Widget.java:1219) at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.openMenuFor(StackRenderer.java:581) at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.access$7(StackRenderer.java:578) at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer$6.menuDetected(StackRenderer.java:572) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:178) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.showMenu(Widget.java:1463) at org.eclipse.swt.widgets.Widget.wmContextMenu(Widget.java:1559) at org.eclipse.swt.widgets.Control.WM_CONTEXTMENU(Control.java:4301) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4164) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2454) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:80) at org.eclipse.swt.widgets.Widget.wmRButtonUp(Widget.java:2380) at org.eclipse.swt.widgets.Control.WM_RBUTTONUP(Control.java:4774) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4227) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4886) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:724)
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java
};
		eventBroker.subscribe(UIEvents.buildTopic(UIEvents.Dirtyable.TOPIC,
				UIEvents.Dirtyable.DIRTY), dirtyUpdater);
	}
	protected void updateTab(CTabItem cti, MPart part, String attName,
			Object newValue) {
		if (UIEvents.UILabel.LABEL.equals(attName)) {
			String newName = (String) newValue;
			cti.setText(getLabel(part, newName));
		} else if (UIEvents.UILabel.ICONURI.equals(attName)) {
			cti.setImage(getImage(part));
		} else if (UIEvents.UILabel.TOOLTIP.equals(attName)) {
			String newTTip = (String) newValue;
			cti.setToolTipText(newTTip);
		} else if (UIEvents.Dirtyable.DIRTY.equals(attName)) {
			Boolean dirtyState = (Boolean) newValue;
			String text = cti.getText();
			boolean hasAsterisk = text.charAt(0) == '*';
			if (dirtyState.booleanValue()) {
				if (!hasAsterisk) {
					cti.setText('*' + text);
				}
			} else if (hasAsterisk) {
				cti.setText(text.substring(1));
			}
		}
	}
	@PreDestroy
	public void contextDisposed() {
		if (tabMenu != null) {