CreationSupport creationSupport) throws Exception {
super(context, description, creationSupport);
// prepare CreationSupport
DocumentElement element = creationSupport.getElement();
if (element == null) {
setCreationSupport(new ElementCreationSupport());
creationSupport = new CreationSupport() {
@Override
public void addElement(DocumentElement parent, int index) throws Exception {
getCreationSupport().addElement(parent, index);
DocumentElement newElement = getCreationSupport().getElement();
setCreationSupport(new ElementCreationSupport(newElement));
m_widget.setCreationSupport(new IsWidgetWrappedCreationSupport(newElement));
}
};
} else {
setCreationSupport(new ElementCreationSupport(element));
creationSupport = new IsWidgetWrappedCreationSupport(element);
}
// create Widget
{
Class<?> widgetClass =