// create a coolitem for the toolbar id if it does not yet exist
IToolBarManager toolBarManager = bars.getToolBarManager(toolBarId);
// Check to see if the group already exists
IContributionItem groupMarker = toolBarManager.find(toolGroupId);
// Add a group marker if one does not exist
if (groupMarker == null) {
toolBarManager.add(new Separator(toolGroupId));
}
IContributionItem refItem = findAlphabeticalOrder(toolGroupId,
contributingId, toolBarManager);
if (refItem != null && refItem.getId() != null) {
toolBarManager.insertAfter(refItem.getId(), actionContribution);
} else {
toolBarManager.add(actionContribution);
}
toolBarManager.update(false);