}
}
private void addContentPanel() throws Exception {
AstEditor editor = getEditor();
JavaInfo content =
JavaInfoUtils.createJavaInfo(
editor,
"com.gwtext.client.widgets.Panel",
new ConstructorCreationSupport());
// set CreationSupport
Expression expression;
{
ClassInstanceCreation creation =
((ConstructorCreationSupport) getCreationSupport()).getCreation();
expression = DomGenerics.arguments(creation).get(0);
String contentSource = content.getCreationSupport().add_getSource(null);
expression = editor.replaceExpression(expression, contentSource);
content.getCreationSupport().add_setSourceExpression(expression);
content.addRelatedNode(expression);
}
// set Association
content.setAssociation(new ConstructorChildAssociation());
// set VariableSupport
VariableSupport variableSupport = new EmptyVariableSupport(content, expression);
content.setVariableSupport(variableSupport);
// add content Panel as child
addChild(content);
}
});
}