Bug 142893 Text key not found when library and report use different resource files
The following scenario was tested with BIRT 2.1RC2: - New library, assign resource file "r1.properties" which contains key/value-pair "k1=v1" - New label in library, set text key of label to "k1" - New report, assign resource file "r2.properties" which does not contain key/value-pair "k1=v1" - Drag and drop label from library to report body - Preview Expected result: - Report shows "v1" Actual result: - Report shows nothing. If key/value-pair "k1=v1" is added to r2.properties, than "v1" is shown.
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/ModelUtil.java
duplicateProperties( parent, element );
		ContentIterator iter1 = new ContentIterator( parent );
		ContentIterator iter2 = new ContentIterator( element );
		while ( iter1.hasNext( ) )
		{
			DesignElement virtualParent = (DesignElement) iter1.next( );
			DesignElement virtualChild = (DesignElement) iter2.next( );
			duplicateProperties( virtualParent, virtualChild );
		}
	}
	/**
	 * Duplicates some properties in a design element when to export it.
	 * 
	 * @param from
	 *            the from element to get the property values
	 * @param to
	 *            the to element to duplicate the property values
	 */
	private static void duplicateProperties( DesignElement from,
			DesignElement to )
	{
		if ( from.getDefn( ).allowsUserProperties( ) )
		{
			Iterator iter = from.getUserProperties( ).iterator( );
			while ( iter.hasNext( ) )
			{
				UserPropertyDefn userPropDefn = (UserPropertyDefn) iter.next( );
				to.addUserPropertyDefn( userPropDefn );
			}
		}