.observeText(control);
if (observableValue != null) {
return observableValue;
}
} catch (IllegalArgumentException e) {
throw new XWTException(e);
}
} else {
if (propertyName == null) {
return null;
}
String getterName = "observe"
+ propertyName.substring(0, 1).toUpperCase()
+ propertyName.substring(1);
Method method;
try {
method = SWTObservables.class.getMethod(getterName,
CONTROL_ARGUMENT_TYPES);
if (method == null) {
for (Method element : SWTObservables.class.getMethods()) {
if (element.getParameterTypes().length != 0) {
continue;
}
if (element.getName().equalsIgnoreCase(getterName)) {
method = element;
break;
}
}
}
if (method != null) {
IObservableValue observableValue = (IObservableValue) method
.invoke(null, control);
if (observableValue != null) {
return observableValue;
}
}
} catch (Exception e) {
throw new XWTException(e);
}
}
IMetaclass mateclass = XWT.getMetaclass(control);
IProperty property = mateclass.findProperty(propertyName);
if (property instanceof EventProperty) {