private void populateItemRefs( List items, Locale locale, Map reportsByOutputName )
{
for ( Iterator i = items.iterator(); i.hasNext(); )
{
MenuItem item = (MenuItem) i.next();
if ( item.getRef() != null )
{
if ( reportsByOutputName.containsKey( item.getRef() ) )
{
MavenReport report = (MavenReport) reportsByOutputName.get( item.getRef() );
if ( item.getName() == null )
{
item.setName( report.getName( locale ) );
}
if ( item.getHref() == null || item.getHref().length() == 0 )
{
item.setHref( report.getOutputName() + ".html" );
}
}
else
{
getLog().warn( "Unrecognised reference: '" + item.getRef() + "'" );
i.remove();
}
}
populateItemRefs( item.getItems(), locale, reportsByOutputName );
}
}