list.add( new SemanticError( targetElement, new String[]{groupName}, SemanticError.DESIGN_EXCEPTION_DUPLICATE_GROUP_NAME ) );
list.add( new NameException( targetElement, groupName, NameException.DESIGN_EXCEPTION_DUPLICATE ) );
	public List validateForAddingGroup( ListingHandle element, String groupName )	{		List groupList = Collections.EMPTY_LIST;		// Collect all groups in this element.		ListingElement targetElement = getListingElement( element				.getModule( ), (ListingElement) element.getElement( ) );		if ( targetElement == null )		{			targetElement = (ListingElement) element.getElement( );			groupList = getGroups( element.getModule( ),					(ListingElement) element.getElement( ) );		}		else		{			groupList = getGroupsWithContents( element.getModule( ),					targetElement );		}		List list = new ArrayList( );		// Check whether the given group name is in the group list.		if ( isDuplicateGroupName( element.getModule( ), groupList, groupName ) )		{			list.add( new SemanticError( targetElement,					new String[]{groupName},					SemanticError.DESIGN_EXCEPTION_DUPLICATE_GROUP_NAME ) );			return list;		}		return list;	}