Package org.eclipse.ecf.presence.search

Examples of org.eclipse.ecf.presence.search.IResult


  private void makeActions() {

    addContactAction = new Action(Messages.MultiRosterView_AddContact, SharedImages.getImageDescriptor(SharedImages.IMG_ADD_BUDDY)) {
      public void run() {
        ITreeSelection selection = (ITreeSelection) treeViewer.getSelection();
        IResult contact = (IResult) selection.getFirstElement();
        if (MessageDialog.openConfirm(null, Messages.AddContactDialog_DialogTitle, NLS.bind(Messages.SearchContactDialog_AddContactMessage, contact.getUser().getName()))) {
          IPresenceContainerAdapter ipca = account.getPresenceContainerAdapter();
          IRosterSubscriptionSender sender = ipca.getRosterManager().getRosterSubscriptionSender();
          try {
            sender.sendRosterAdd(contact.getUser().getID().getName(), contact.getUser().getName(), null);
          } catch (ECFException e) {
            Activator.getDefault().getLog().log(e.getStatus());
          }
        }
View Full Code Here


      // check if there is at least one result
      assertTrue(0 != resultList.getResults().size());

      Iterator it = resultList.getResults().iterator();
      while (it.hasNext()) {
        IResult type = (IResult) it.next();
        System.out.println(type.getUser().getName() + " : "
            + type.getUser().getID());

      }
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.presence.search.IResult

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.