diff options
author | vbhadrir | 2006-01-29 07:16:55 +0000 |
---|---|---|
committer | vbhadrir | 2006-01-29 07:16:55 +0000 |
commit | 1260a05106e96e87ab995563d5641bb4d270c37f (patch) | |
tree | 92bb54754c4d0b452f1e1e562ff44f5d5e20524d | |
parent | aa74b43e18eaec97bc3c3a93fb9bd3e74dcd85c5 (diff) | |
download | webtools.common-1260a05106e96e87ab995563d5641bb4d270c37f.tar.gz webtools.common-1260a05106e96e87ab995563d5641bb4d270c37f.tar.xz webtools.common-1260a05106e96e87ab995563d5641bb4d270c37f.zip |
[118448] - org.eclipse.wst.validation.validator support for facets enhancement added
-rw-r--r-- | plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java index 7294a1459..54b0a7290 100644 --- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java +++ b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/ValidationRegistryReader.java @@ -962,13 +962,15 @@ public final class ValidationRegistryReader implements RegistryConstants { private String[] getProjectFacetIds(IProject project) { try { IFacetedProject fProject = ProjectFacetsManager.create(project); - Object[] projectFacets = fProject.getProjectFacets().toArray(); - String[] projectFacetIds = new String[projectFacets.length]; - for (int i = 0; i < projectFacets.length; i++) { - IProjectFacet projectFacet = ((IProjectFacetVersion) projectFacets[i]).getProjectFacet(); - projectFacetIds[i] = projectFacet.getId(); + if (fProject != null) { + Object[] projectFacets = fProject.getProjectFacets().toArray(); + String[] projectFacetIds = new String[projectFacets.length]; + for (int i = 0; i < projectFacets.length; i++) { + IProjectFacet projectFacet = ((IProjectFacetVersion) projectFacets[i]).getProjectFacet(); + projectFacetIds[i] = projectFacet.getId(); + } + return projectFacetIds; } - return projectFacetIds; } catch (CoreException ce) { Logger.getLogger().log(ce); } |