Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcbateman2010-08-24 16:50:14 +0000
committercbateman2010-08-24 16:50:14 +0000
commit9b9e2a5f3a7feacb9b0be6dbdc184583fb1e5e92 (patch)
tree0ed878c544cc5564d5081e6aedb14b9687798758
parentfa63ee4c8b3e45be0d028e4a2ca9677049d43701 (diff)
downloadwebtools.jsf-9b9e2a5f3a7feacb9b0be6dbdc184583fb1e5e92.tar.gz
webtools.jsf-9b9e2a5f3a7feacb9b0be6dbdc184583fb1e5e92.tar.xz
webtools.jsf-9b9e2a5f3a7feacb9b0be6dbdc184583fb1e5e92.zip
[bug 323291] Apply patch to fix el-resolver loading problem and make app config manager more robust.
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/internal/AbstractJSFAppConfigManager.java22
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/internal/translator/ELResolverTypeTranslator.java4
2 files changed, 19 insertions, 7 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/internal/AbstractJSFAppConfigManager.java b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/internal/AbstractJSFAppConfigManager.java
index 26ac52551..a6ee504e0 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/internal/AbstractJSFAppConfigManager.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.core/src/org/eclipse/jst/jsf/core/jsfappconfig/internal/AbstractJSFAppConfigManager.java
@@ -11,6 +11,8 @@ import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.ISafeRunnable;
+import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -219,11 +221,21 @@ public abstract class AbstractJSFAppConfigManager
*/
protected List<FacesConfigType> getFacesConfigModels() {
final List<FacesConfigType> facesConfigModels = new ArrayList<FacesConfigType>();
- for(final IJSFAppConfigProvider configProvider : getJSFAppConfigProviders()) {
- final FacesConfigType facesConfig = configProvider.getFacesConfigModel();
- if (facesConfig != null) {
- facesConfigModels.add(facesConfig);
- }
+ for(final IJSFAppConfigProvider configProvider : getJSFAppConfigProviders()) {
+ SafeRunner.run(new ISafeRunnable() {
+
+ public void handleException(Throwable exception) {
+ //SafeRunner will log the exception
+ }
+
+ public void run() throws Exception {
+ final FacesConfigType facesConfig = configProvider.getFacesConfigModel();
+ if (facesConfig != null) {
+ facesConfigModels.add(facesConfig);
+ }
+ }
+
+ });
}
return facesConfigModels;
}
diff --git a/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/internal/translator/ELResolverTypeTranslator.java b/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/internal/translator/ELResolverTypeTranslator.java
index 9aabe6efd..96b054850 100644
--- a/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/internal/translator/ELResolverTypeTranslator.java
+++ b/jsf/plugins/org.eclipse.jst.jsf.facesconfig/facesconfig/org/eclipse/jst/jsf/facesconfig/internal/translator/ELResolverTypeTranslator.java
@@ -34,8 +34,8 @@ public class ELResolverTypeTranslator extends Translator {
FacesConfigPackage facesPackage = FacesConfigPackage.eINSTANCE;
return new Translator[] {
- new Translator(TEXT_ATTRIBUTE_VALUE, facesPackage.getPropertyResolverType_TextContent()),
- new Translator("id", facesPackage.getPropertyResolverType_Id(), DOM_ATTRIBUTE) //$NON-NLS-1$
+ new Translator(TEXT_ATTRIBUTE_VALUE, facesPackage.getELResolverType_TextContent()),
+ new Translator("id", facesPackage.getELResolverType_Id(), DOM_ATTRIBUTE) //$NON-NLS-1$
};
}
}

Back to the top