byte [] buffer2;
int xmString2 = 0;
public void setText (String string) {	checkWidget();	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);	/*	* Feature in Motif.  Motif does not optimize the case	* when the same text is set into a menu item causing	* it to flash.  The fix is to test for equality and	* do nothing.	*/	if (text.equals (string)) return;	super.setText (string);	if ((style & (SWT.ARROW | SWT.SEPARATOR)) != 0) return;		/*	* Bug in Linux.  In certain contexts setting the label of a	* CHECK or RADIO menu item to the empty string can cause a	* GP.  The fix is to set the menu label to a space in such	* cases since it displays equivalently.	*/	if (OS.IsLinux && (style & (SWT.CHECK | SWT.RADIO)) != 0) {		if (string.length () == 0) string = " ";	}	char [] text = new char [string.length ()];	string.getChars (0, text.length, text, 0);	boolean accel = false;	int i=0, j=0, mnemonic=0;	while (i < text.length) {		if (text [i] == '\t') {accel = true; break;};		if ((text [j++] = text [i++]) == '&') {			if (i == text.length) {continue;}			if (text [i] == '&') {i++; continue;}			if (mnemonic == 0) mnemonic = text [i];			j--;		}	}	byte [] buffer2;	if (accel && ++i < text.length) {		char [] accelText = new char [text.length - i];		System.arraycopy (text, i, accelText, 0, accelText.length);		/* Use the character encoding for the default locale */		buffer2 = Converter.wcsToMbcs (null, accelText, true);	} else {		buffer2 = new byte [1];	}	int xmString2 = OS.XmStringParseText (		buffer2,		0,		OS.XmFONTLIST_DEFAULT_TAG, 		OS.XmCHARSET_TEXT, 		null,		0,		0);	if (xmString2 == 0) error (SWT.ERROR_CANNOT_SET_TEXT);	while (j < text.length) text [j++] = 0;	/* Use the character encoding for the default locale */	byte [] buffer1 = Converter.wcsToMbcs (null, text, true);	int xmString1 = OS.XmStringParseText (		buffer1,		0,		OS.XmFONTLIST_DEFAULT_TAG, 		OS.XmCHARSET_TEXT, 		null,		0,		0);	if (xmString1 == 0) error (SWT.ERROR_CANNOT_SET_TEXT);	if (mnemonic == 0) mnemonic = OS.XK_VoidSymbol;	int [] argList = {		OS.XmNlabelType, OS.XmSTRING,		OS.XmNlabelString, xmString1,		OS.XmNmnemonic, mnemonic,		OS.XmNacceleratorText, xmString2,	};	OS.XtSetValues (handle, argList, argList.length / 2);	if (xmString1 != 0) OS.XmStringFree (xmString1);	if (xmString2 != 0) OS.XmStringFree (xmString2);}