removeContents( content );    dropUserProperties( content ); if ( content.hasReferences( ) ) adjustReferenceClients( (ReferenceableElement) content, unresolveReference ); adjustReferredClients( content ); adjustDerived( content );    if ( content.getStyle( module ) != null ) { StyleCommand styleCmd = new StyleCommand( module, content ); styleCmd.setStyle( null ); }    if ( content.getExtendsElement( ) != null ) { ExtendsCommand extendsCmd = new ExtendsCommand( module, content ); extendsCmd.setExtendsName( null ); }    if ( content.getName( ) != null ) { NameCommand nameCmd = new NameCommand( module, content ); nameCmd.dropElement( ); }
doDelectAction( content, unresolveReference );
	private void doRemove( DesignElement content, int slotID,			boolean unresolveReference, boolean flag ) throws SemanticException	{		assert content != null;		// Ensure that the content can be dropped from the container.		if ( !element.getDefn( ).isContainer( ) )			throw new ContentException( element, slotID,					ContentException.DESIGN_EXCEPTION_NOT_CONTAINER );		ContainerSlot slot = element.getSlot( slotID );		if ( slot == null )			throw new ContentException( element, slotID,					ContentException.DESIGN_EXCEPTION_SLOT_NOT_FOUND );		if ( !slot.contains( content ) )			throw new ContentException( element, slotID, content,					ContentException.DESIGN_EXCEPTION_CONTENT_NOT_FOUND );		if ( !slot.canDrop( content ) )			throw new ContentException( element, slotID, content,					ContentException.DESIGN_EXCEPTION_DROP_FORBIDDEN );		// Can not drop a virtual element. However, if it is called when		// dropping the child element, the check should be ignored.		if ( !content.canDrop( ) && !flag )			throw new ContentException(					element,					slotID,					content,					ContentException.DESIGN_EXCEPTION_STRUCTURE_CHANGE_FORBIDDEN );		// if the content is in component slot of report design and it has		// children, then the operation is forbidden.		if ( hasDescendents( content, slotID ) )		{			throw new ContentException( element, slotID,					ContentException.DESIGN_EXCEPTION_HAS_DESCENDENTS );		}		// Prepare the transaction.		ContentRecord dropRecord = new ContentRecord( module, element, slotID,				content, false );		ActivityStack stack = getActivityStack( );		stack.startFilterEventTrans( dropRecord.getLabel( ) );		try		{			// Remove contents.			removeContents( content );			// Clean up references to or from the element.			dropUserProperties( content );			if ( content.hasReferences( ) )				adjustReferenceClients( (ReferenceableElement) content,						unresolveReference );			adjustReferredClients( content );			adjustDerived( content );			// Drop the style...			if ( content.getStyle( module ) != null )			{				StyleCommand styleCmd = new StyleCommand( module, content );				styleCmd.setStyle( null );			}			// Drop the extends...			if ( content.getExtendsElement( ) != null )			{				ExtendsCommand extendsCmd = new ExtendsCommand( module, content );				extendsCmd.setExtendsName( null );			}			// Remove from name space...			if ( content.getName( ) != null )			{				NameCommand nameCmd = new NameCommand( module, content );				nameCmd.dropElement( );			}		}		catch ( SemanticException ex )		{			stack.rollback( );			throw ex;		}		// Remove the element itself.		stack.execute( dropRecord );		stack.commit( );	}