Bug 158494 [Regression] Exception is thrown out when apply a pre-defined style to an item
Exception is thrown out when apply a pre-defined style to an item Steps to reproduce: 1. New a pre-defined style "Data": edit font color as red 2. Drag data from palette to lay out 3. Choose the data item and go to Properties editor -> General -> Style Expected result: Style Data should not show up Actual result: Choose Style Data and exception is thrown out Error log: A BIRT exception occurred. Plug-in Provider:Eclipse.org Plug-in Name:BIRT Model Plug-in ID:org.eclipse.birt.report.model Version:2.1.1.v20060922-0630 Error Code:Error.StyleException.NOT_FOUND Error Message:The style "Data" used by report.Body[0] is not found.
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/views/attributes/providers/ChoiceSetFactory.java
import java.util.Comparator;
import java.util.Iterator;
import org.eclipse.birt.report.designer.core.model.SessionHandleAdapter;
import org.eclipse.birt.report.designer.nls.Messages;
import org.eclipse.birt.report.designer.util.DEUtil;
import org.eclipse.birt.report.model.api.DataSetHandle;
import org.eclipse.birt.report.model.api.DesignEngine;
import org.eclipse.birt.report.model.api.GroupHandle;
import org.eclipse.birt.report.model.api.MasterPageHandle;
import org.eclipse.birt.report.model.api.ModuleHandle;
import org.eclipse.birt.report.model.api.ReportElementHandle;
import org.eclipse.birt.report.model.api.SlotHandle;
import org.eclipse.birt.report.model.api.StyleHandle;
import org.eclipse.birt.report.model.api.core.IAccessControl;
import org.eclipse.birt.report.model.api.elements.DesignChoiceConstants;
import org.eclipse.birt.report.model.api.elements.structures.FilterCondition;
import org.eclipse.birt.report.model.api.elements.structures.FormatValue;
import org.eclipse.birt.report.model.api.elements.structures.SortKey;
import org.eclipse.birt.report.model.api.metadata.IChoice;
import org.eclipse.birt.report.model.api.metadata.IChoiceSet;
import org.eclipse.birt.report.model.api.metadata.IColorConstants;
import org.eclipse.birt.report.model.api.metadata.IElementPropertyDefn;
import org.eclipse.birt.report.model.api.metadata.IPropertyDefn;
import org.eclipse.birt.report.model.api.metadata.IPropertyType;
import org.eclipse.birt.report.model.api.metadata.IStructureDefn;
/**
 * ChoiceSetFactory provides common interface to access all kinds of collection
 * on given property.
 */
public class ChoiceSetFactory