Author: scabanovich
Date: 2010-12-29 07:20:28 -0500 (Wed, 29 Dec 2010)
New Revision: 27794
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectBean.java
Log:
JBIDE-8011
https://issues.jboss.org/browse/JBIDE-8011
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectBean.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectBean.java 2010-12-29
12:19:27 UTC (rev 27793)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFProjectBean.java 2010-12-29
12:20:28 UTC (rev 27794)
@@ -132,7 +132,7 @@
boolean isProperty = false;
if(BeanUtil.isGetter(ms[i]) || BeanUtil.isSetter(ms[i])) {
String propertyName = BeanUtil.getPropertyName(n);
- if(propertyName != null && checkPropertyReturnType(ms[i])) {
+ if(propertyName != null) {
n = propertyName;
isProperty = true;
}
@@ -256,36 +256,4 @@
return c;
}
- private boolean isGetter(IMethod method, String pref) {
- if(method == null) return false;
- String name = method.getElementName();
- if(!name.startsWith(pref) || name.length() <= pref.length()) return false;
- try {
- String[] ps = method.getParameterNames();
- if(ps == null || ps.length != 0) return false;
- String t = EclipseJavaUtil.getMemberTypeAsString(method);
- if(t == null || t.equals("void")) return false;
- } catch (JavaModelException e) {
- return false;
- }
-
- return true;
- }
-
- //TODO move this to BeanUtil.isGetter and isSetter
- private boolean checkPropertyReturnType(IMethod method) {
- if(method == null) {
- return false;
- }
- String typeName = EclipseJavaUtil.getMemberTypeAsString(method);
- if(typeName == null || typeName.equals("void")) {
- return false;
- }
- if(method.getElementName().startsWith(BeanUtil.IS)) {
- if(!"boolean".equals(typeName) &&
!"java.lang.Boolean".equals(typeName)) {
- return false;
- }
- }
- return true;
- }
}