TemplateElement.REF_TEMPLATE_PARAMETER_PROP,
IDesignElementModel.REF_TEMPLATE_PARAMETER_PROP,
	private void addTemplateParameterDefinition( Object obj,			DesignElement content, int slotID ) throws ContentException	{		assert obj instanceof ElementRefValue;		ElementRefValue templateParam = (ElementRefValue) obj;		if ( templateParam.getElement( ) == null )		{			// a template element must define an explicit parameter definition			if ( content instanceof TemplateElement )				throw new ContentException(						element,						slotID,						content,						ContentException.DESIGN_EXCEPTION_INVALID_TEMPLATE_ELEMENT );			// if content is a ReportItem, then look the definition in the			// report, if found and type is identical, then let it be; otherwise			// clear parameter definition			else			{				try				{					PropertyCommand cmd = new PropertyCommand( module, content );					cmd							.clearProperty( IDesignElementModel.REF_TEMPLATE_PARAMETER_PROP );				}				catch ( SemanticException e )				{					assert false;				}				return;			}		}		else if ( !( content instanceof TemplateElement ) )		{			try			{				if ( needClearParameterDefinition( content, templateParam						.getName( ) ) )				{					PropertyCommand cmd = new PropertyCommand( module, content );					cmd							.clearProperty( IDesignElementModel.REF_TEMPLATE_PARAMETER_PROP );				}			}			catch ( SemanticException e )			{				assert false;			}			return;		}		TemplateParameterDefinition definition = (TemplateParameterDefinition) templateParam				.getElement( );		if ( module.findTemplateParameterDefinition( templateParam.getName( ) ) != definition )		{			try			{				DesignElement copyTemplateParam = ModelUtil						.getCopy( definition );				module.makeUniqueName( copyTemplateParam );				ContentCommand cmd = new ContentCommand( module, module );				cmd.add( copyTemplateParam,						ReportDesign.TEMPLATE_PARAMETER_DEFINITION_SLOT );				PropertyCommand propertyCmd = new PropertyCommand( module,						content );				propertyCmd.setProperty(						TemplateElement.REF_TEMPLATE_PARAMETER_PROP,						copyTemplateParam );			}			catch ( NameException e )			{				assert false;			}			catch ( SemanticException e )			{				assert false;			}		}	}