Bug 198562 [Contributions] Change ActionContributionItem + CommandContributionItem to use event coordinates
In order to enable RTL support on Linux, we have changed the recommended way of determining the location of a Toolitem pop up menu. Attaching a patch for UI.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.java
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.swt.widgets.Widget;
/**
 * A contribution item which delegates to an action.
 * <p>
 * This class may be instantiated; it is not intended to be subclassed.
 * </p>
 */
public class ActionContributionItem extends ContributionItem {
	/**
	 * Mode bit: Show text on tool items, even if an image is present. If this
	 * mode bit is not set, text is only shown on tool items if there is no
	 * image present.
	 * 
	 * @since 3.0
	 */
	public static int MODE_FORCE_TEXT = 1;
	
	private static final String ellipsis = "...";