RosterEntryElement rosterEntryElement = (RosterEntryElement) Platform
.getAdapterManager().getAdapter(treeItem.getData(),
RosterEntryElement.class);
ChatControl chatControl = chatRooms
.getActiveChatControl();
/*
* TODO create links like those of the World of Warcraft
* chat which then can be clicked to execute some action
* e.g inviting user to a session are add them to the
* roster (but should not be done here at all)
*/
if (rosterEntryElement != null && chatControl != null) {
String currentText = chatControl.getInputText();
chatControl.setInputText(currentText + "["
+ rosterEntryElement.getJID().getBase() + "]");
}
}
} else {