targetHandle.setProperty( propDefn.getName( ), refValue .getName( ) );
{ String name = refValue.getName( ); name = ModelUtil.needTheNamespacePrefix( (ReferenceValue) value, getElement( ).getRoot( ), getModule( ) ); targetHandle.setProperty( propDefn.getName( ), name ); }
	public void copyPropertyTo( String propName,			DesignElementHandle targetHandle ) throws SemanticException	{		assert ( targetHandle.getModule( ) == getModule( ) );		if ( targetHandle.getModule( ) != getModule( ) )			throw new IllegalArgumentException(					"The target element should be in the same report !" ); //$NON-NLS-1$		if ( targetHandle.getDefn( ) != getDefn( ) )			throw new PropertyValueException(					targetHandle.getDefn( ).getName( ),					PropertyValueException.DESIGN_EXCEPTION_WRONG_ELEMENT_TYPE,					PropertyType.ELEMENT_REF_TYPE );		PropertyDefn propDefn = (ElementPropertyDefn) getDefn( ).getProperty(				propName );		if ( propDefn == null )			throw new PropertyNameException( getElement( ), propName );		propDefn = (ElementPropertyDefn) targetHandle.getDefn( ).getProperty(				propName );		if ( propDefn == null )			throw new PropertyNameException( targetHandle.getElement( ),					propName );		Object value = getElement( ).getLocalProperty( module,				propDefn.getName( ) );		if ( value == null )		{			targetHandle.setProperty( propName, null );			return;		}		if ( DesignElement.NAME_PROP.equals( propName )				|| DesignElement.EXTENDS_PROP.equals( propName ) )		{			throw new SemanticError( getElement( ), new String[]{propName},					SemanticError.DESIGN_EXCEPTION_PROPERTY_COPY_FORBIDDEN );		}		switch ( propDefn.getTypeCode( ) )		{			case PropertyType.ELEMENT_REF_TYPE :				ElementRefValue refValue = (ElementRefValue) value;				if ( refValue.isResolved( ) )					targetHandle.setProperty( propDefn.getName( ), refValue							.getElement( ) );				else					targetHandle.setProperty( propDefn.getName( ), refValue							.getName( ) );				break;			case PropertyType.STRUCT_REF_TYPE :				StructRefValue structRefValue = (StructRefValue) value;				if ( structRefValue.isResolved( ) )					targetHandle.setProperty( propDefn.getName( ),							structRefValue.getStructure( ) );				else					targetHandle.setProperty( propDefn.getName( ),							structRefValue.getName( ) );				break;			case PropertyType.STRUCT_TYPE :				if ( propDefn.isList( ) )				{					PropertyHandle propHandle = targetHandle							.getPropertyHandle( propName );					Iterator strcutIter = ( (List) value ).iterator( );					while ( strcutIter.hasNext( ) )					{						Structure struct = (Structure) strcutIter.next( );						propHandle.addItem( struct.copy( ) );					}				}				else				{					IStructure struct = (IStructure) value;					targetHandle.setProperty( propName, struct.copy( ) );				}				break;			default :				targetHandle.setProperty( propName, value );		}	}