Package org.eclipse.ecf.presence.ui

Examples of org.eclipse.ecf.presence.ui.MessagesView$ChatTab


  private void displayMessage(IChatMessageEvent e) {
    final IChatMessage message = e.getChatMessage();
    Display.getDefault().asyncExec(new Runnable() {
      public void run() {
        MessagesView view = (MessagesView) workbench
            .getActiveWorkbenchWindow().getActivePage()
            .findView(MessagesView.VIEW_ID);
        if (view != null) {
          final IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) view
              .getSite().getAdapter(
                  IWorkbenchSiteProgressService.class);
          view.openTab(icms, itms, targetID, message.getFromID());
          view.showMessage(message);
          service.warnOfContentChange();
        } else {
          try {

            final IWorkbenchPage page = workbench
                .getActiveWorkbenchWindow().getActivePage();
            view = (MessagesView) page.showView(
                MessagesView.VIEW_ID, null,
                IWorkbenchPage.VIEW_CREATE);
            if (!page.isPartVisible(view)) {
              final IWorkbenchSiteProgressService service = (IWorkbenchSiteProgressService) view
                  .getSite()
                  .getAdapter(
                      IWorkbenchSiteProgressService.class);
              service.warnOfContentChange();
            }
            view.openTab(icms, itms, targetID, message.getFromID());
            view.showMessage(message);
          } catch (final PartInitException e) {
            e.printStackTrace();
          }
        }
      }
View Full Code Here


  }

  private void displayTypingNotification(final ITypingMessageEvent e) {
    Display.getDefault().asyncExec(new Runnable() {
      public void run() {
        final MessagesView view = (MessagesView) workbench
            .getActiveWorkbenchWindow().getActivePage()
            .findView(MessagesView.VIEW_ID);
        if (view != null)
          view.displayTypingNotification(e);
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.presence.ui.MessagesView$ChatTab

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.