Package org.eclipse.ecf.internal.example.collab

Examples of org.eclipse.ecf.internal.example.collab.ClientEntry


  protected ClientEntry isConnected(IResource res) {
    if (res == null)
      return null;
    final CollabClient client = CollabClient.getDefault();
    final ClientEntry entry = client.isConnected(res, CollabClient.GENERIC_CONTAINER_CLIENT_NAME);
    return entry;
  }
View Full Code Here


      return;
    final IFile file = getFileForPart(editor);
    if (file == null)
      return;
    final IProject project = file.getProject();
    final ClientEntry entry = isConnected(project.getWorkspace().getRoot());
    if (entry == null) {
      MessageDialog.openInformation(getWorkbench().getDisplay().getActiveShell(), Messages.SetSharedEditorSelectionAction_DIALOG_NOT_CONNECTED_TITLE, Messages.SetSharedEditorSelectionAction_DIALOG_NOT_CONNECTED_TEXT);
      return;
    }
    final EclipseCollabSharedObject collabsharedobject = entry.getSharedObject();
    if (collabsharedobject != null) {
      collabsharedobject.sendOpenAndSelectForFile(null, project.getName() + "/" + file.getProjectRelativePath().toString(), textSelection.getOffset(), textSelection.getLength()); //$NON-NLS-1$
    }
  }
View Full Code Here

 
  private ClientEntry isConnected(IResource res) {
    if (res == null)
      return null;
    CollabClient client = CollabClient.getDefault();
    ClientEntry entry = client.isConnected(res,
        CollabClient.GENERIC_CONTAINER_CLIENT_NAME);
    return entry;
  }
View Full Code Here

      // Create the wizard dialog
      WizardDialog dialog = new WizardDialog(shell, wizard);
      // Open the wizard dialog
      dialog.open();
    } else {
      ClientEntry client = isConnected(resource);
      if (client == null) {
        connected = false;
        action.setText(CONNECT_PROJECT_MENU_TEXT);
      } else {
        EclipseCollabSharedObject collab = client.getSharedObject();
        if (collab != null) {
          collab.chatGUIDestroy();
        }
      }
    }
View Full Code Here

  protected ClientEntry isConnected(IResource res) {
    if (res == null)
      return null;
    final CollabClient client = CollabClient.getDefault();
    final ClientEntry entry = client.isConnected(res, CollabClient.GENERIC_CONTAINER_CLIENT_NAME);
    return entry;
  }
View Full Code Here

  public void run(IAction action) {
    if (file == null) {
      return;
    }
    final IProject project = file.getProject();
    final ClientEntry entry = isConnected(project);
    if (entry == null) {
      MessageDialog.openInformation(targetPart.getSite().getWorkbenchWindow().getShell(), Messages.OpenSharedEditorAction_DIALOG_NOT_CONNECTED_TITLE, NLS.bind(Messages.OpenSharedEditorAction_DIALOG_NOT_CONNECTED_TEXT, project.getName()));
      return;
    }
    final EclipseCollabSharedObject collabsharedobject = entry.getSharedObject();
    if (collabsharedobject != null) {
      collabsharedobject.sendLaunchEditorForFile(null, file.getProjectRelativePath().toString());
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.internal.example.collab.ClientEntry

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.