public static IRemoteClient getClientByNode(IServer server, IClientNode node) {
    for (IRemoteClient client : server.getClients()) {
      if (client.getNode() == node) return client;
    }

    return null;
  }
  public static IRemoteClient getClient(IServer server, Participant client) {
    for (IRemoteClient remoteClient : server.getClients()) {
      if (remoteClient.getParticipant() == client) return remoteClient;
    }

    return null;
  }
 public static List<IRemoteClient> getClientsByStates(
     final IServer server, final State... states) {
   return Arrays.asList(
       Collections2.filter(
               server.getClients(),
               new Predicate<IRemoteClient>() {
                 @Override
                 public boolean apply(IRemoteClient client) {
                   return Arrays.binarySearch(states, client.getParticipant().getState()) >= 0;
                 }
               })
           .toArray(new IRemoteClient[] {}));
 }
  /**
   * ModifyModulesWizard constructor.
   *
   * @param server a server
   */
  public ModifyModulesWizard(IServer server) {
    super(Messages.wizModuleWizardTitle, new ModifyModulesWizard2());

    if (server != null) getTaskModel().putObject(TaskModel.TASK_SERVER, server.createWorkingCopy());
  }