ExtendedItem.EXTENSION_NAME_PROP ) );
IExtendedItemModel.EXTENSION_NAME_PROP ) );
	public static boolean duplicateStructure( DesignElement source,			DesignElement target )	{		if ( source == null || target == null )			throw new IllegalArgumentException( "Element can not be null." ); //$NON-NLS-1$		IElementDefn defn = source.getDefn( );		if ( defn != target.getDefn( ) )			throw new IllegalArgumentException(					"Two element are not the same type." ); //$NON-NLS-1$		if ( !defn.isContainer( ) )			return true;		// Copies top level slots from cloned element to the target element.		for ( int i = 0; i < defn.getSlotCount( ); i++ )		{			ContainerSlot sourceSlot = source.getSlot( i );			ContainerSlot targetSlot = target.getSlot( i );			// clear the slot contents of the this element.			targetSlot.clear( );			for ( int j = 0; j < sourceSlot.getCount( ); j++ )			{				DesignElement sourceContent = sourceSlot.getContent( j );				// create an element of the same type				DesignElement targetContent = null;				if ( sourceContent instanceof ExtendedItem )				{					ExtendedItem extendedItem = (ExtendedItem) sourceContent;					targetContent = new ExtendedItem( sourceContent.getName( ) );					targetContent.setProperty(							ExtendedItem.EXTENSION_NAME_PROP, extendedItem									.getProperty( extendedItem.getRoot( ),											ExtendedItem.EXTENSION_NAME_PROP ) );				}				else if ( sourceContent instanceof OdaDataSet )				{				}				else if ( sourceContent instanceof OdaDataSource )				{				}				else					targetContent = ModelUtil.newElement( sourceContent							.getElementName( ), sourceContent.getName( ) );				if ( targetContent != null )				{					// set up the element id and base id					targetContent.setID( sourceContent.getID( ) );					targetContent.setBaseId( sourceContent.getID( ) );					// setup the containment relationship					targetSlot.add( targetContent );					targetContent.setContainer( target, i );					// recusively duplicates the slots of the content					duplicateStructure( sourceContent, targetContent );				}			}		}		return true;	}