saveHtmlPreviewAs_ = commands.saveHtmlPreviewAs().createToolbarButton();
toolbar.addLeftWidget(saveHtmlPreviewAs_);
}
else
{
ToolbarPopupMenu menu = new ToolbarPopupMenu();
menu.addItem(commands.saveHtmlPreviewAs().createMenuItem(false));
menu.addItem(commands.saveHtmlPreviewAsLocalFile().createMenuItem(false));
saveHtmlPreviewAs_ = toolbar.addLeftWidget(new ToolbarButton(
"Save As",
commands.saveSourceDoc().getImageResource(),
menu));