commit | 6eb5d52fd9109a2e49aa0fb8e9ab8cd8f3786a80 | [log] [tgz] |
---|---|---|
author | rsanchez <rsanchez> | Wed Jan 11 16:47:23 2012 +0000 |
committer | rsanchez <rsanchez> | Wed Jan 11 16:47:23 2012 +0000 |
tree | c64890b1beb8bc70638931894de24790d0fe9e68 | |
parent | cb6b92229d1a524a01abefa3bb0798a07a16ec7e [diff] |
[367860] Avoid IllegalArgumentException in Validation filters
diff --git a/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/FilterRule.java b/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/FilterRule.java index edcf8da..d1e05ce 100644 --- a/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/FilterRule.java +++ b/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/FilterRule.java
@@ -444,12 +444,19 @@ //Dispay facet Labels when selecting Settings if(_facetLabel == null){ - IProjectFacet facet = ProjectFacetsManager.getProjectFacet(_pattern); - facetLabel = facet.getLabel(); + try + { + IProjectFacet facet = ProjectFacetsManager.getProjectFacet(_pattern); + facetLabel = facet.getLabel(); + } catch(IllegalArgumentException ex) { + //do nothing + } } - - b.append(facetLabel); - b.append(" - "); //$NON-NLS-1$ + + if(facetLabel != null && facetLabel.length() > 0){ + b.append(facetLabel); + b.append(" - "); //$NON-NLS-1$ + } b.append(_pattern);
diff --git a/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/ValidatorHelper.java b/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/ValidatorHelper.java index 4ecb4ca..06f03ad 100644 --- a/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/ValidatorHelper.java +++ b/plugins/org.eclipse.wst.validation/vf2/org/eclipse/wst/validation/internal/model/ValidatorHelper.java
@@ -73,9 +73,15 @@ */ public static String getRuntimeName(String id) { - IRuntime runtime = RuntimeManager.getRuntime(id); - if(runtime != null) - return runtime.getLocalizedName(); + try + { + IRuntime runtime = RuntimeManager.getRuntime(id); + if(runtime != null) + return runtime.getLocalizedName(); + + } catch(IllegalArgumentException ex){ + //do nothing + } return null; }