* @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"));
text = text.replaceAll(Text.DELIMITER, "\n");
return text;
}
return "";
}