PropertyDescriptor[] descriptors = new PropertyDescriptor[propertyDescriptors.size()];
descriptors = (PropertyDescriptor[]) propertyDescriptors.toArray(descriptors);
// build the category
categoryComposite = new PropertiesComposite(categoryContainer, SWT.NONE, descriptors, context, category.isIsSynchronizable());
categoryComposite.setBackground(getDisplay().
getSystemColor(SWT.COLOR_LIST_BACKGROUND));
// store the category composite in the map
categoryComposites.put(category, categoryComposite);
// disable the composite if there are no rules selected
categoryComposite.setEnabled(styleProperties != null && isEnabled());
PropertiesComposite propertiesComposite = (PropertiesComposite) categoryComposite;
if (styleProperties != null) {
propertiesComposite.updateFromProxy(styleProperties);
}
propertiesComposite.addPropertiesCompositeChangeListener(new PropertiesCompositeChangeListener() {
public void propertyChanged(PropertiesComposite composite, PropertyDescriptor property, Object newValue) {
stylePropertyChanged(composite, property.getIdentifier());
}
});
}