Author: scabanovich
Date: 2007-09-13 10:58:21 -0400 (Thu, 13 Sep 2007)
New Revision: 3613
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/AddManagedBeanPropertiesContext.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/AddManagedPropertySupport.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/bean/BeanHelper.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/bean/ManagedBeanHelper.java
Log:
JBIDE-895
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/AddManagedBeanPropertiesContext.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/AddManagedBeanPropertiesContext.java 2007-09-13
14:31:29 UTC (rev 3612)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/AddManagedBeanPropertiesContext.java 2007-09-13
14:58:21 UTC (rev 3613)
@@ -33,7 +33,7 @@
properties = new HashMap<String,IJavaElement>();
try {
properties = BeanHelper.getJavaProperties(type);
- } catch (Exception e) {
+ } catch (JavaModelException e) {
//ignore
}
if(properties.size() != enablement.length) {
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/AddManagedPropertySupport.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/AddManagedPropertySupport.java 2007-09-13
14:31:29 UTC (rev 3612)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/AddManagedPropertySupport.java 2007-09-13
14:58:21 UTC (rev 3613)
@@ -14,6 +14,7 @@
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.common.java.generation.*;
import org.jboss.tools.common.meta.action.*;
import org.jboss.tools.common.meta.action.impl.*;
@@ -60,7 +61,7 @@
classCheck.update(s);
try {
fields = BeanHelper.getJavaProperties(classCheck.getExistingClass());
- } catch (Exception e) {
+ } catch (JavaModelException e) {
fields = new TreeMap<String,IJavaElement>();
}
XModelObject[] cs = getTarget().getChildren("JSFManagedProperty");
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/bean/BeanHelper.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/bean/BeanHelper.java 2007-09-13
14:31:29 UTC (rev 3612)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/bean/BeanHelper.java 2007-09-13
14:58:21 UTC (rev 3613)
@@ -21,7 +21,7 @@
public class BeanHelper {
- public static Map<String,IJavaElement> getJavaProperties(IType type) throws
Exception {
+ public static Map<String,IJavaElement> getJavaProperties(IType type) throws
JavaModelException {
Map<String,IJavaElement> map = new TreeMap<String,IJavaElement>();
if(type == null || !type.exists()) return map;
IField[] fs = type.getFields();
@@ -44,7 +44,7 @@
return (rootName.toUpperCase().equals(rootName)) ? rootName : rootName.substring(0,
1).toLowerCase() + rootName.substring(1);
}
- static Map<String,IJavaElement> getSuperTypeJavaProperties(IType type) throws
Exception {
+ static Map<String,IJavaElement> getSuperTypeJavaProperties(IType type) throws
JavaModelException {
String scn = type.getSuperclassName();
if(scn == null || scn.length() == 0 || scn.equals("java.lang.Object")) return
null;
String[][] rs = type.resolveType(scn);
@@ -71,7 +71,7 @@
}
}
- public static IMethod findGetter(IType type, String property) throws Exception {
+ public static IMethod findGetter(IType type, String property) throws JavaModelException
{
IMethod[] ms = type.getMethods();
for (int i = 0; i < ms.length; i++) {
String n = ms[i].getElementName();
@@ -88,7 +88,7 @@
return null;
}
- public static IMethod findSetter(IType type, String property) throws Exception {
+ public static IMethod findSetter(IType type, String property) throws JavaModelException
{
IMethod[] ms = type.getMethods();
for (int i = 0; i < ms.length; i++) {
String n = ms[i].getElementName();
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/bean/ManagedBeanHelper.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/bean/ManagedBeanHelper.java 2007-09-13
14:31:29 UTC (rev 3612)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/bean/ManagedBeanHelper.java 2007-09-13
14:58:21 UTC (rev 3613)
@@ -22,7 +22,7 @@
IJavaProject jp = BeanHelper.getJavaProject(bean);
try {
return jp == null ? null : jp.findType(typename);
- } catch (Exception e) {
+ } catch (JavaModelException e) {
//ignore
return null;
}
Show replies by date