dialog.open();
// If selection cancelled then simply return
if (dialog.getReturnCode() != Window.OK)
return;
// Get selected room, selected manager, and selected IChatRoomInfo
IChatRoomInfo selectedInfo = dialog.getSelectedRoom().getRoomInfo();
MultiRosterAccount account = dialog.getSelectedRoom().getAccount();
// Now get the secondary ID from the selected room id
final IContainer container = account.getContainer();
final ID connectedID = container.getConnectedID();
if (connectedID == null) {
MessageDialog.openError(getViewSite().getShell(), Messages.MultiRosterView_NO_IDENTIFIER_FOR_ROOM_TITLE, NLS.bind(Messages.MultiRosterView_NO_IDENTIFIER_FOR_ROOM_MESSAGE, selectedInfo.getRoomID()));
return;
}
try {
joinChatRoom(container, selectedInfo, null);
} catch (ECFException e) {
Throwable e1 = e.getStatus().getException();
Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, Messages.MultiRosterView_EXCEPTION_LOG_JOIN_ROOM, e1));
ContainerConnectErrorDialog ed = new ContainerConnectErrorDialog(getViewSite().getShell(), selectedInfo.getRoomID().getName(), e1);
ed.open();
}
}