Bug 142928 Item from library is changed to a report design item after revert to report item
Details: Item from library is changed to a report design item after revert to report item. Setp: 1.New a template. 2.Use a libary contain a label. 3.Drop the label from library explorer into layout. 4.Change the label to template item. 5.Revert the template item to report item. Actual result: The label is become a report item, but a item from library. Please see the attach image. Exception result: The lable is revert a item from library.
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/DesignElementHandle.java
import org.eclipse.birt.report.model.elements.TemplateElement;
import org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel;
import org.eclipse.birt.report.model.metadata.ElementDefn;
import org.eclipse.birt.report.model.metadata.ElementPropertyDefn;
import org.eclipse.birt.report.model.metadata.ElementRefValue;
import org.eclipse.birt.report.model.metadata.MetaDataDictionary;
import org.eclipse.birt.report.model.metadata.PropertyDefn;
import org.eclipse.birt.report.model.metadata.PropertyType;
import org.eclipse.birt.report.model.metadata.ReferenceValue;
import org.eclipse.birt.report.model.metadata.StructRefValue;
import org.eclipse.birt.report.model.util.ModelUtil;
import org.eclipse.birt.report.model.util.ReferenceValueUtil;
/**
 * Base class for all report elements. Provides a high-level interface to the
 * BIRT report model. This class provides generic services for all elements.
 * Derived classes provide specialized methods for each element type.
 * <p>
 * Element handles are immutable. Once created, they always point to the same
 * element. Handles also cannot point to a null element. An assertion will be
 * raised if the derived classes are created with a null element.
 * <p>
 * For a complete description of the services available for any design element,
 * see the class description for the
 * {@link org.eclipse.birt.report.model.core.DesignElement}class.
 * 
 * @see SlotHandle
 * @see org.eclipse.birt.report.model.core.DesignElement
 */
public abstract class DesignElementHandle implements IDesignElementModel
{