Bug 164436 [Regression]Chart can't be converted to a template report item[02]
Description: Chart can't be converted to a template report item Build number: 2.2.0.v20061114-1013 Steps to reproduce: 1.New a chart 2.Right click the chart Expected result: "Create Template Report Item" is enabled Actual result: "Create Template Report Item" is grayed out Error log: N/A
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/ModelUtil.java
* @param reference
	 * @param referred
	 * 
	 * @return <code>true</code> if there is reference. Otherwise
	 *         <code>false</code>.
	 */
	public static boolean isRecursiveReference( DesignElement reference,
			ReferenceableElement referred )
	{
		if ( reference == referred )
			return true;
		List backRefs = referred.getClientList( );
		List referenceElements = new ArrayList( );
		for ( int i = 0; i < backRefs.size( ); i++ )
		{
			BackRef backRef = (BackRef) backRefs.get( i );
			DesignElement tmpElement = backRef.getElement( );
			if ( tmpElement == reference )
				return true;
			if ( tmpElement instanceof ReferenceableElement )
				referenceElements.add( tmpElement );
		}
		for ( int i = 0; i < referenceElements.size( ); i++ )
		{
			if ( isRecursiveReference( reference,
					(ReferenceableElement) referenceElements.get( i ) ) )
				return true;
		}
		return false;
	}