Bug 55827 [Contributions] Need to remove refs to Platform.getDebugOption from JFace
build I20040323 Standalone JFace applications are currently broken due to several refs to Platform.getDebugOption in JFace, which is only available if Eclipse is running. Should have static flags for the various debug options in JFace, and initialize them from the Workbench.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.java
* exceed the given width. The default implementation replaces characters
	 * in the center of the original string with an ellipsis ("..."). Override
	 * if you need a different strategy.
	 */
	protected String shortenText(String textValue , ToolItem item) {
		if (textValue == null)
			return null;
		GC gc = new GC(item.getDisplay());
		int maxWidth = item.getImage().getBounds().width * 4;
		
		if(gc.textExtent(textValue).x < maxWidth) {
			gc.dispose();
			return textValue ;
		}
		
		for (int i = textValue.length(); i > 0; i--) {
			String test = textValue .substring(0, i);
			test = test + ellipsis;
			if(gc.textExtent(test).x < maxWidth) {
				gc.dispose();
				return test ;
			}
				
		}	
		gc.dispose();
		
		return textValue ;
	}
}