} catch (XMPPException e) {
e.printStackTrace();
ErrorDialog.openError(sShell,"Error while retrieving registration information","Could not retrieve registration information from " + reg.getFrom() + ": " + e.getLocalizedMessage(),new Status(IStatus.ERROR,GOIMPlugin.ID,IStatus.OK,"Error while retrieving registration information.",e));
return;
}
Form form = Form.getFormFrom(result);
new FormAnswerDialog(sShell, (Registration)result, form).open();
}
});
searchItem.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
String addressid = (String) selectedItem.getData("address");
new SearchUI(account,addressid);
}
});
multiUserChatCreateRoom.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
String addressid = (String) selectedItem.getData("address");
if (addressid == null)
return;
InputDialog dialog = new InputDialog(sShell,
"Creating MUC Room",
"Enter the name for the New Room (will be known as yourinput@" + addressid + ")",
null,null);
int r = dialog.open();
if(r != InputDialog.OK) return;
String room = dialog.getValue();
String froom = room + "@" + addressid;
MultiUserChat muc = new MultiUserChat(account.xmpp.getConnection(),froom);
try {
muc.create(account.getUsername());
account.chatWindowExtensionManager.openMUCWindow(froom,muc);
Form form = muc.getConfigurationForm();
FormAnswerDialog d = new FormAnswerDialog(sShell, null, form);
r = d.open();
if(r != FormAnswerDialog.OK) {
// Creating instant room
muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
} else {
muc.sendConfigurationForm(d.getResultForm());
}
MessageDialog.openInformation(sShell,"Successfully created Room.","Successfully created and joined room: " + froom);
} catch (XMPPException e) {