Bug 122850 Table/list should not be able to be inserted in Master Page mode.
Description: Table/list should not be able to be inserted in Master Page mode. Steps to reproduce: 1. New a report and transfer to Master Page mode. 2. New a datasource and dataset 3. Drag a list/table to page header/footer, bind it to dataset and drag some columns inside. 4. Save and preview Expected result: Insert list/table item in master page should be forbidden. Actual result: They are allowed and preview showed "undefine" in page
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/validators/TableHeaderContextContainmentValidator.java
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.eclipse.birt.report.model.api.command.ContentException;
import org.eclipse.birt.report.model.api.elements.ReportDesignConstants;
import org.eclipse.birt.report.model.api.metadata.IElementDefn;
import org.eclipse.birt.report.model.core.DesignElement;
import org.eclipse.birt.report.model.core.Module;
import org.eclipse.birt.report.model.elements.ListingElement;
import org.eclipse.birt.report.model.elements.TableItem;
import org.eclipse.birt.report.model.metadata.ElementDefn;
import org.eclipse.birt.report.model.metadata.MetaDataDictionary;
import org.eclipse.birt.report.model.validators.AbstractElementValidator;
/**
 * Validates the element is not allowed to appear in the specific slot of the
 * given container type in any level.
 * 
 * <h3>Rule</h3>
 * The rule is that whether the given element can recursively resides in the
 * specific slot of specific container type.
 * 
 * <h3>Applicability</h3>
 * This validator is only applied to <code>TableItem</code> and
 * <code>ListItem</code> currently.
 * 
 */
public class TableHeaderContextContainmentValidator
		extends
			AbstractElementValidator
{