* @return the result of invocation of Widget#getText()
*/
public static String getText(final Object obj) {
if ((obj instanceof Widget) && !((Widget) obj).isDisposed()) {
Widget widget = (Widget) obj;
String text = UIThreadRunnable.syncExec(widget.getDisplay(), new ReflectionInvoker(obj, "getText")); //$NON-NLS-1$
text = text.replaceAll(Text.DELIMITER, "\n"); //$NON-NLS-1$
return text;
}
return ""; //$NON-NLS-1$
}