current = this; while ( current != null ) { iter = current.propValues.keySet( ).iterator( ); while ( iter.hasNext( ) ) { String key = (String) iter.next( ); if ( element.propValues.get( key ) != null ) continue;  PropertyDefn propDefn = getPropertyDefn( key ); Object value = current.propValues.get( key ); element.propValues.put( key, ModelUtil.copyValue( propDefn, value ) ); }  current = current.isVirtualElement( ) ? current.getVirtualParent( ) : current.getExtendsElement( ); }
	public Object clone( ) throws CloneNotSupportedException	{		DesignElement element = (DesignElement) super.clone( );		element.container = null;		element.listeners = null;		element.derived = null;		element.extendsRef = null;		element.cachedDefn = null;		element.handle = null;		element.baseId = NO_BASE_ID;		element.propValues = new HashMap( );		// the element id is the same as the matrix, then if we add the copy to		// the design tree, we will check the id and re-allocate a unique name		// for it. This is the same issue as the name does.		DesignElement current = this;		Iterator iter = null;		while ( current != null )		{			iter = current.propValues.keySet( ).iterator( );			while ( iter.hasNext( ) )			{				String key = (String) iter.next( );				if ( element.propValues.get( key ) != null )					continue;				PropertyDefn propDefn = getPropertyDefn( key );				Object value = current.propValues.get( key );				element.propValues.put( key, ModelUtil.copyValue( propDefn,						value ) );			}			if ( !current.isVirtualElement( ) && current.userProperties != null )			{				if ( element.userProperties == null )					element.userProperties = new LinkedHashMap( );				iter = current.userProperties.keySet( ).iterator( );				while ( iter.hasNext( ) )				{					Object key = iter.next( );					if ( element.userProperties.get( key ) != null )						continue;					UserPropertyDefn uDefn = (UserPropertyDefn) current.userProperties							.get( key );					element.userProperties.put( key, uDefn.copy( ) );				}			}			current = current.isVirtualElement( )					? current.getVirtualParent( )					: current.getExtendsElement( );		}		return element;	}