@Override
protected Widget createMainWidget()
{
// create widget and set size
Widget editWidget = editor_.getWidget();
Size size = DomMetrics.adjustedCodeElementSize(sourceText_, 25, 100);
if (!minimumSize_.isEmpty())
{
size = new Size(Math.max(size.width, minimumSize_.width),
Math.max(size.height, minimumSize_.height));
}
editWidget.setSize(size.width + "px", size.height + "px");
editor_.setCode(sourceText_, false);