{
for(int i = 0; i < parentMenu.getItemCount(); i++)
{
JMenuItem item = parentMenu.getItem(i);
if(item instanceof AutoAnswerMenuItem)
<BUG>{
item.setText(
AutoAnswerMenuItem.getItemDisplayName(
((AutoAnswerMenuItem)item).getProtocolProvider()));
item.setIcon(new ImageIcon(
((AutoAnswerMenuItem)item).getProtocolProvider()
.getProtocolIcon().getIcon(
ProtocolIcon.ICON_SIZE_16x16)));</BUG>
}

{
ServiceReference serRef;
ProtocolProviderService protocolProvider;
for (AccountID accountID : providerFactory.getRegisteredAccounts())
{
serRef = providerFactory.getProviderForAccount(accountID);
protocolProvider =
(ProtocolProviderService) GuiActivator.bundleContext
.getService(serRef);
addAccountInternal(protocolProvider, parentMenu);
