addContactButton.addMouseListener(new MouseAdapter() {
public void mouseUp(MouseEvent e) {
TableItem contact = tableResult.getSelection()[0];
if (MessageDialog.openConfirm(null, Messages.AddContactDialog_DialogTitle, NLS.bind(Messages.SearchContactDialog_AddContactMessage, contact.getText(0)))) {
IPresenceContainerAdapter ipca = account.getPresenceContainerAdapter();
IRosterSubscriptionSender sender = ipca.getRosterManager().getRosterSubscriptionSender();
try {
sender.sendRosterAdd(contact.getText(1), contact.getText(0), null);
} catch (ECFException e1) {
Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, e1.getLocalizedMessage(), e1));
}