// }
}
private void validateFile(final IFile file, final IReporter reporter)
{
FacesConfigArtifactEdit facesConfigEdit = null;
//Bug 290962 - NPE if faces-config.xml is in wrong folder
final IPath path = JSFAppConfigUtils.getWebContentFolderRelativePath(file);
if (path == null)
{
reporter.addMessage(this, new Message(JSFCorePlugin.getDefault().getBundle().getSymbolicName(), IMessage.NORMAL_SEVERITY, Messages.CONFIG_FILE_NOT_UNDER_WEBCONTENT_FOLDER));
}
else
{
try
{
facesConfigEdit = FacesConfigArtifactEdit.
getFacesConfigArtifactEditForRead(file.getProject(), path.toString());
if (facesConfigEdit != null
&& facesConfigEdit.getFacesConfig()!=null)
{
final String version = validateVersioning(file, facesConfigEdit, reporter);
validateModel(file, facesConfigEdit,reporter, version);
}
}
finally
{
if (facesConfigEdit != null)
{
facesConfigEdit.dispose();
}
}
}
}