new ToolbarButtonViewBuilder()
.setIcon(css.insertGadget())
.applyTo(toolbar.addClickButton(), new ToolbarClickButton.Listener() {
@Override public void onClicked() {
final FocusedRange focusedRange = editor.getSelectionHelper().getSelectionRange();
GadgetSelectorWidget selector = new GadgetSelectorWidget(new GadgetInfoProviderImpl(new GwtGadgetInfoParser()));
selector.addFeaturedOptions();
final UniversalPopup popup = selector.showInPopup();
selector.setListener(new GadgetSelectorWidget.Listener() {
@Override public void onSelect(String url) {
insertGadget(url, focusedRange);
popup.hide();
}
});