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
MPart part = (MPart) objElement;
				String attName = (String) event
						.getProperty(UIEvents.EventTags.ATTNAME);
				Object newValue = event
						.getProperty(UIEvents.EventTags.NEW_VALUE);
				
				MElementContainer<MUIElement> parent = part.getParent();
				if (parent != null
						&& parent.getRenderer() == StackRenderer.this) {
					CTabItem cti = findItemForPart(part, parent);
					if (cti != null) {
						updateTab(cti, part, attName, newValue);
					}
					return;
				}
				
				
				List<MPlaceholder> refs = ElementReferenceRenderer
						.getRenderedPlaceholders(part);
				for (MPlaceholder ref : refs) {
					MElementContainer<MUIElement> refParent = ref.getParent();
					if (refParent.getRenderer() instanceof StackRenderer) {
						CTabItem cti = findItemForPart(ref, refParent);
						if (cti != null) {
							updateTab(cti, part, attName, newValue);
						}
					}
				}
			}