Bug 317312 [Compatibility] Update launch config and pick Run causes NPEs
bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/ShellActivationListener.java
private static final String ECLIPSE_CONTEXT_PREV_CHILD = "org.eclipse.e4.ui.dialogContext.prevChild"; 
	private MApplication application;
	ShellActivationListener(MApplication application) {
		this.application = application;
	}
	public void handleEvent(Event event) {
		if (!(event.widget instanceof Shell)) {
			return;
		}
		Shell shell = (Shell) event.widget;
		Object obj = shell.getData(AbstractPartRenderer.OWNING_ME);
		if (obj instanceof MWindow) {
			return;
		}
		obj = shell.getData(DIALOG_IGNORE_KEY);
		if (obj instanceof Boolean && ((Boolean) obj).booleanValue()) {
			return;
		}
		switch (event.type) {
		case SWT.Activate:
			activate(shell);
			break;
		case SWT.Deactivate:
			deactivate(shell);
			break;
		}
	}
	private void activate(Shell shell) {
		IEclipseContext parentContext = getParentContext(shell);
		IEclipseContext shellContext = getShellContext(shell, parentContext);