Changing the order of custom Toolbar Icons

I have two extensions but they are by default positioned to the bottom of the toolbar in the viewer. Where in the code could I access the part which adds the extension buttons to the toolbar?