use of org.eclipse.ecf.presence.im.IChatManager in project ecf by eclipse.
the class ChatComposite method sendPrivateTextMsg.
protected void sendPrivateTextMsg(IUser data) {
if (this.view.lch != null) {
IPresenceContainerAdapter ipca = this.view.lch.getPresenceContainer();
MessagesView messagesView = this.view.lch.findMessagesView();
if (messagesView != null) {
IChatManager chatManager = ipca.getChatManager();
messagesView.openTab(chatManager.getChatMessageSender(), chatManager.getTypingMessageSender(), this.view.lch.getContainerID(), data.getID());
}
}
}
use of org.eclipse.ecf.presence.im.IChatManager in project ecf by eclipse.
the class MSNConnectWizard method performFinish.
public boolean performFinish() {
final String connectID = page.getEmail();
final String password = page.getPassword();
// Save combo text even if we don't successfully login
page.saveComboText();
connectContext = ConnectContextFactory.createPasswordConnectContext(password);
try {
targetID = container.getConnectNamespace().createInstance(new Object[] { connectID });
} catch (final IDCreateException e) {
new IDCreateErrorDialog(null, connectID, e).open();
return false;
}
page.saveComboItems();
final IPresenceContainerAdapter adapter = (IPresenceContainerAdapter) container.getAdapter(IPresenceContainerAdapter.class);
container.addListener(new IContainerListener() {
public void handleEvent(IContainerEvent event) {
if (event instanceof IContainerConnectedEvent) {
Display.getDefault().asyncExec(new Runnable() {
public void run() {
openView();
}
});
}
}
});
final IChatManager icm = adapter.getChatManager();
icms = icm.getChatMessageSender();
itms = icm.getTypingMessageSender();
icm.addMessageListener(new IIMMessageListener() {
public void handleMessageEvent(IIMMessageEvent e) {
if (e instanceof IChatMessageEvent) {
displayMessage((IChatMessageEvent) e);
} else if (e instanceof ITypingMessageEvent) {
displayTypingNotification((ITypingMessageEvent) e);
}
}
});
new AsynchContainerConnectAction(container, targetID, connectContext, null, new Runnable() {
public void run() {
cachePassword(connectID, password);
}
}).run();
return true;
}
use of org.eclipse.ecf.presence.im.IChatManager in project ecf by eclipse.
the class AbstractAdapterAccessTest method testGetChatManager.
public void testGetChatManager() {
final IPresenceContainerAdapter adapter = getPresenceAdapter();
assertNotNull(adapter);
final IChatManager chatManager = adapter.getChatManager();
assertNotNull(chatManager);
}
Aggregations