if (manager == null)
{
return null;
}
final IDTViewHandler viewHandler =
DesignTimeApplicationManager.getInstance(project)
.getViewHandler();
try
{
final DTFacesContext facesContext = manager.getFacesContext(file);
if (facesContext != null)
{
final IViewDefnAdapterFactory factory =
viewHandler.getViewMetadataAdapterFactory(facesContext);
final IViewDefnAdapter adapter =
factory.createAdapter(facesContext, viewHandler.getViewId(
facesContext, file));
if (adapter instanceof XMLViewDefnAdapter)
{
return (XMLViewDefnAdapter) adapter;