I've not seen many examples of it, but using UiBinder and @UiChild annotation, you can make an interface for the buttons they might want to add, and then have a handler for them. This way, the 3rd parties could just implement your interface (i.e. GenericIcon) and put it inside your toolbar. I've used this for generic sidebar infoPanels, flipbook panels, and the like in my projects. The setup seems a little non-intuitive/verbose at first, but is really pretty simple.
For example:
<!-- UiBinder file -->
<someNamespace:YourToolbarWidget>
<someNamespace:iconpanel>
<3rdPartyNamespace:ImplementsGenericIcon />
</someNamespace:iconpanel>
</someNamespace:YourToolbarWidget>
You just need to add the @UiChild handler to the YourToolbarWidget class to handle the creation of icons.
// inside YourToolbarWidget.java
@UiChild(limit=10,tagname="iconpanel")
public void addIconPanel(Widget panel) {
// "panel" Widget about is the content of the "iconpanel" tag
GenericIcon content = (GenericIcon) panel;
someContainer.add(content);
}
As mentioned in
other posts, @UiChild does not have many extant examples. I've been meaning to put one online. I hope the above helps as I had to dig for it the first time I used it too.
Sincerely,
Joseph