Author: scabanovich
Date: 2009-04-22 11:57:29 -0400 (Wed, 22 Apr 2009)
New Revision: 14850
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/list/WebPromptingProvider.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3804
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/list/WebPromptingProvider.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/list/WebPromptingProvider.java 2009-04-22
15:19:00 UTC (rev 14849)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/project/list/WebPromptingProvider.java 2009-04-22
15:57:29 UTC (rev 14850)
@@ -24,7 +24,8 @@
static {
String[][] pns = new String[][]{
{"org.jboss.tools.jsf.model.pv.JSFPromptingProvider",
"org.jboss.tools.jsf"},
- {"org.jboss.tools.struts.model.pv.StrutsPromptingProvider",
"org.jboss.tools.struts"}
+ {"org.jboss.tools.struts.model.pv.StrutsPromptingProvider",
"org.jboss.tools.struts"},
+ {"org.jboss.tools.seam.xml.components.model.SeamPromptingProvider",
"org.jboss.tools.seam.xml"}
};
List<IWebPromptingProvider> l = new ArrayList<IWebPromptingProvider>();
for (int i = 0; i < pns.length; i++) {
@@ -52,9 +53,21 @@
}
public List<Object> getList(XModel model, String id, String prefix, Properties
properties) {
+ String error = null;
for (int i = 0; i < providers.length; i++) {
- if(providers[i].isSupporting(id)) return providers[i].getList(model, id, prefix,
properties);
+ if(providers[i].isSupporting(id)) {
+ List<Object> result = providers[i].getList(model, id, prefix, properties);
+ String err = properties == null ? null : (String)properties.remove(ERROR);
+ if(err == null) {
+ return result;
+ } else if(error == null) {
+ error = err;
+ }
+ }
}
+ if(properties != null && error != null) {
+ properties.setProperty(ERROR, error);
+ }
return EMPTY_LIST;
}