Examples of IRoster


Examples of org.eclipse.ecf.presence.roster.IRoster

    @Override
    public Object execute(ExecutionEvent event) throws ExecutionException {
        IRosterEntry rosterEntry = getRosterEntry();
        if (rosterEntry == null) return null;
       
        IRoster roster = rosterEntry.getRoster();
        IContainer container = (IContainer) roster.getPresenceContainerAdapter().getAdapter(IContainer.class);
        if (container.getConnectedID() == null)
            showErrorMessage("not connected.");
            SelectionShare sender = ECFContribution.getDefault().getStringShare(container.getID());
            if (sender == null)
                showErrorMessage("no sender.");
//            currently share anyway to be able do do better debugging
//            if (sender.isSharing())
//                showErrorMessage("sharing already started.");
//            final ITextEditor textEditor = getTextEditor();
//            if (textEditor == null)
//                showErrorMessage(Messages.DocShareRosterMenuHandler_EXCEPTION_EDITOR_NOT_TEXT);
//            final String inputName = getInputName(textEditor);
//            if (inputName == null)
//                showErrorMessage(Messages.DocShareRosterMenuHandler_NO_FILENAME_WITH_CONTENT);
            final IUser user = roster.getUser();
            sender.startShare(user.getID(), rosterEntry.getUser().getID());
       
        return null;
    }
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRoster

    action.setText(Messages.ViewShareRosterContributionItem_VIEWSHARE_LISTENER_MENU_REMOVE_TEXT);
    return new IAction[] {action};
  }

  protected IAction[] makeActions() {
    final IRoster roster = getSelectedRoster();
    if (roster != null) {
      // Roster is selected
      final IContainer c = getContainerForRoster(roster);
      if (c != null) {
        // Get existing ViewShare for this container (if it exists)
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRoster

    action.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Messages.URLShareRosterContributionItem_BROWSER_ICON));
    return new IAction[] {action};
  }

  protected IAction[] makeActions() {
    final IRoster roster = getSelectedRoster();
    if (roster != null) {
      // Roster is selected
      final IContainer c = getContainerForRoster(roster);
      if (c != null) {
        // Get existing urlshare for this container (if it exists)
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRoster

    action.setText(Messages.ScreenCaptureShareRosterContributionItem_SCREENCAPTURESHARE_LISTENER_MENU_REMOVE_TEXT);
    return new IAction[] {action};
  }

  protected IAction[] makeActions() {
    final IRoster roster = getSelectedRoster();
    if (roster != null) {
      // Roster is selected
      final IContainer c = getContainerForRoster(roster);
      if (c != null) {
        // Get existing ScreenCaptureShare for this container (if it exists)
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRoster

     */
    public String getText(Object element) {
      IRosterItem item = (IRosterItem) element;
      if(item == null)
        return ""; //$NON-NLS-1$
      IRoster roster = item.getRoster();
      return roster != null ? item.getName() + " - " + roster.getName() : "" ; //$NON-NLS-1$ //$NON-NLS-2$
     
    }
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRoster

    if (container == null)
      return NO_CONTRIBUTIONS;
    final DocShare docShare = Activator.getDefault().getDocShare(container.getID());
    if (docShare == null)
      return NO_CONTRIBUTIONS;
    final IRoster roster = presenceContainerAdapter.getRosterManager().getRoster();
    final IContributionItem[] contributions = createContributionItemsForRoster(roster);
    if (contributions == null || contributions.length == 0)
      return NO_CONTRIBUTIONS;
    final MenuManager menuManager = createMenuManagerForRoster(roster);
    for (int i = 0; i < contributions.length; i++) {
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRoster

   * @throws ExecutionException 
   */
  public Object execute(ExecutionEvent arg0) throws ExecutionException {
    IRosterEntry rosterEntry = getRosterEntry();
    if (rosterEntry != null) {
      IRoster roster = rosterEntry.getRoster();
      final IContainer container = (IContainer) roster.getPresenceContainerAdapter().getAdapter(IContainer.class);
      if (container.getConnectedID() == null)
        showErrorMessage(Messages.DocShareRosterMenuHandler_ERROR_NOT_CONNECTED);
      final DocShare sender = Activator.getDefault().getDocShare(container.getID());
      if (sender == null)
        showErrorMessage(Messages.DocShareRosterMenuHandler_ERROR_NO_SENDER);
      if (sender.isSharing())
        showErrorMessage(Messages.DocShareRosterMenuHandler_ERROR_EDITOR_ALREADY_SHARING);
      final ITextEditor textEditor = getTextEditor();
      if (textEditor == null)
        showErrorMessage(Messages.DocShareRosterMenuHandler_EXCEPTION_EDITOR_NOT_TEXT);
      final String inputName = getInputName(textEditor);
      if (inputName == null)
        showErrorMessage(Messages.DocShareRosterMenuHandler_NO_FILENAME_WITH_CONTENT);
      final IUser user = roster.getUser();
      sender.startShare(user.getID(), user.getName(), rosterEntry.getUser().getID(), inputName, textEditor);
    }
    return null;
  }
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRoster

  /* (non-Javadoc)
   * @see org.eclipse.ecf.presence.ui.roster.AbstractPresenceContributionItem#makeActions()
   */
  protected IAction[] makeActions() {
    final IRoster roster = getSelectedRoster();
    if (roster != null) {
      IAction action = new Action() {
        public void run() {
          // Write selected roster to console
          new RosterWriterHelper().writeRosterToConsole(roster);
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRoster

    BrowseDialog dialog = new BrowseDialog(window.getShell(), containers);
    int status = dialog.open();
    if (status == Window.OK) {
      Object[] object = dialog.getResult();
      IRosterEntry entry = (IRosterEntry) object[0];
      IRoster roster = entry.getRoster();
      if (roster != null) {
        IChatManager manager = roster.getPresenceContainerAdapter().getChatManager();
        IChatMessageSender icms = manager.getChatMessageSender();
        ITypingMessageSender itms = manager.getTypingMessageSender();
        try {
          MessagesView view = (MessagesView) window.getActivePage().showView(MessagesView.VIEW_ID);
          view.selectTab(icms, itms, roster.getUser().getID(), entry.getUser().getID());
        } catch (PartInitException e) {
          e.printStackTrace();
        }
      }
    }
View Full Code Here

Examples of org.eclipse.ecf.presence.roster.IRoster

    private Map imageTable = new HashMap(7);
   
    public Image getImage(Object element) {
      IRosterItem item = (IRosterItem) element;
      IRoster roster = item.getRoster();
      IWorkbenchAdapter adapter = getAdapter(roster);
      if (adapter == null)
        return null;
      ImageDescriptor descriptor = adapter.getImageDescriptor(roster);
      if (descriptor == null)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.