Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 435284
Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/ShowInMenu.java (-1 / +9 lines)
Lines 37-42 Link Here
37
import org.eclipse.swt.SWT;
37
import org.eclipse.swt.SWT;
38
import org.eclipse.swt.widgets.Menu;
38
import org.eclipse.swt.widgets.Menu;
39
import org.eclipse.swt.widgets.MenuItem;
39
import org.eclipse.swt.widgets.MenuItem;
40
import org.eclipse.swt.widgets.Shell;
40
import org.eclipse.ui.IEditorPart;
41
import org.eclipse.ui.IEditorPart;
41
import org.eclipse.ui.ISourceProvider;
42
import org.eclipse.ui.ISourceProvider;
42
import org.eclipse.ui.ISources;
43
import org.eclipse.ui.ISources;
Lines 325-331 Link Here
325
326
326
		IWorkbenchPage page = window.getActivePage();
327
		IWorkbenchPage page = window.getActivePage();
327
		if (page != null) {
328
		if (page != null) {
328
			return page.getActivePart();
329
			IWorkbenchPart activePart = page.getActivePart();
330
			/*
331
			 * NOTE: Do not use window.getShell() to test since this won't work
332
			 * for detached views (see bug 412285)
333
			 */
334
			Shell activePartShell = activePart.getSite().getShell();
335
			if (activePartShell == activePartShell.getDisplay().getActiveShell())
336
				return activePart;
329
		}
337
		}
330
		return null;
338
		return null;
331
	}
339
	}

Return to bug 435284