Bug 62703 refactoring & source quick menus location should be confined to workbench [quick menu]
I20040518 M9 testpass 1. Use eclipse without it covering the entire screen, but merely the lower left 2. Open JavaEditor.java 3. Put the editor caret somewhere on AbstractSelectionChangedListener::install 4. Without changing the selection, scroll to the very end of the end of the file 5. Press Alt+Shift+T/S to bring up the quick menu -> expected: the menu shows up somewhere in the eclipse workbench -> actual: the menu shows up on the very top of the screen, over other applications.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/QuickMenuAction.java
}
	}
	
	/**
	 * Hook to compute the menu location if the focus widget is
	 * a table widget.
	 * 
	 * @param table the table widget that has the focus
	 * 
	 * @return a widget relative position of the menu to pop up
	 */
	protected Point computeMenuLocation(Table table) {
		TableItem[] items= table.getSelection();
		switch (items.length) {
			case 0: {
				return null;
			} case 1: {
				Rectangle bounds= items[0].getBounds(0);
				Rectangle iBounds= items[0].getImageBounds(0);
				return table.toDisplay(
					Math.max(0, bounds.x + iBounds.width + getAvarageCharWith(table) * CHAR_INDENT), 
					bounds.y + bounds.height);
			} default: {
				Rectangle[] rectangles= new Rectangle[items.length];
				for (int i= 0; i < rectangles.length; i++) {
					rectangles[i]= items[i].getBounds(0);
				}
				Rectangle iBounds= items[0].getImageBounds(0);
				Point cursorLocation= table.getDisplay().getCursorLocation();
				Point p= findBestLocation(getIncludedPositions(rectangles, table.getClientArea()),