Bug 183910 Cross tab can not be reverted to template item after it is reverted to report item [1102]
Description: Cross tab can not be reverted to template item after it is reverted to report item. Build number: 2.2.0.v20070425-0630 Steps to reproduce: 1. New a cross tab. 2. Right click to select the cross tab, choose "Create Template Report Item" to create template item, then revert the cross tab to report item. 3. Right click to select the cross tab. Expected result: The cross tab cna be revert to report item and template item both. Actual result: In the context menu, "Revert To Report Item" and "Revert To Template Item" are grayed out. Error log: N/A
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/elements/TemplateFactory.java
* @param name
	 *            name of the created template element
	 * @return the created template element, or <code>null</code> if the
	 *         default element is not a report item or a data set
	 */
	public static TemplateElement createTemplate( Module module,
			DesignElement defaultElement, String name )
	{
		assert defaultElement != null;
		if ( defaultElement instanceof ReportItem )
		{
			if ( StringUtil.isBlank( name ) )
				return new TemplateReportItem( );
			else
				return new TemplateReportItem( name );
		}
		else if ( defaultElement instanceof SimpleDataSet )
		{
			TemplateDataSet template = new TemplateDataSet( name );
			assert module != null;
			module.makeUniqueName( template );
			return template;
		}
		else
		{
			return null;
		}
	}
}