Package net.sourceforge.fullsync

Examples of net.sourceforge.fullsync.Task


    actions.add(ignore);

    Action[] as = new Action[actions.size()];
    actions.toArray(as);
    return new Task(src, dst, state, as);
  }
View Full Code Here


    if (!takeIgnoreDecider.isNodeIgnored(src)) {
      for (TaskGenerationListener listener : taskGenerationListeners) {
        listener.taskGenerationStarted(src, dst);
      }

      Task task = getActionDecider().getTask(src, dst, stateDecider, bufferStateDecider);
      logger.debug(src.getName() + ": " + task);

      for (TaskGenerationListener listener : taskGenerationListeners) {
        listener.taskGenerationFinished(task);
      }
View Full Code Here

    actions.add(ignore);

    Action[] as = new Action[actions.size()];
    actions.toArray(as);
    return new Task(src, dst, state, as);
  }
View Full Code Here

    actions.add(ignore);

    Action[] as = new Action[actions.size()];
    actions.toArray(as);
    return new Task(src, dst, state, as);
  }
View Full Code Here

    actions.add(ignore);

    Action[] as = new Action[actions.size()];
    actions.toArray(as);
    return new Task(src, dst, state, as);
  }
View Full Code Here

    actions.add(ignore);

    Action[] as = new Action[actions.size()];
    actions.toArray(as);
    return new Task(src, dst, state, as);
  }
View Full Code Here

    buffer.flush();
  }

  @Override
  public void entryFinished(EntryDescriptor entry, IOException ioe) {
    Task task = entry.getTask();
    if (null != task) {
      if (null != ioe) {
        fireTaskFinished(new TaskFinishedEvent(task, ioe.getLocalizedMessage()));
      }
      else {
View Full Code Here

    }
    addTaskChildren(t);
  }

  protected void updateTask(TableItem item) {
    Task t = (Task) item.getData();
    Image image = getTaskImage(t);
    item.setImage(2, image);
    item.setText(3, t.getCurrentAction().getExplanation());
  }
View Full Code Here

      @Override
      public void widgetSelected(SelectionEvent e) {
        Action targetAction = (Action) e.widget.getData();

        for (TableItem item : tableItemList) {
          Task task = (Task) item.getData();
          Action[] actions = task.getActions();

          for (int iAction = 0; iAction < actions.length; iAction++) {
            Action a = actions[iAction];
            if ((a.getType() == targetAction.getType()) && (a.getLocation() == targetAction.getLocation())
                && a.getExplanation().equals(targetAction.getExplanation())) {
              task.setCurrentAction(iAction);
              break;
            }
          }

          updateTask(item);
        }
      }
    };


    Task[] taskList = new Task[tableItemList.length];
    for (int i = 0; i < tableItemList.length; i++) {
      taskList[i] = (Task) tableItemList[i].getData();
    }

    Menu m = new Menu(this);
    MenuItem mi;

    // load initial actions of first task
    Action[] possibleActions = taskList[0].getActions().clone();

    for (int iTask = 1; iTask < taskList.length; iTask++) {
      // invalidate all possible actions we dont find in this actionlist
      Action[] actions = taskList[iTask].getActions();

      for (int iPosAction = 0; iPosAction < possibleActions.length; iPosAction++) {
        Action action = possibleActions[iPosAction];
        boolean found = false;

        if (action == null) {
          continue;
        }

        // check whether action is also supported by this task
        for (Action a : actions) {
          if ((a.getType() == action.getType()) && (a.getLocation() == action.getLocation())
              && a.getExplanation().equals(action.getExplanation())) {
            // the action exists
            found = true;
            break;
          }
        }

        if (!found) {
          // invalidate action that is not supported by all selected tasks
          possibleActions[iPosAction] = null;
        }
      }
    }

    Task referenceTask = taskList.length == 1 ? taskList[0] : null;
    for (Action action : possibleActions) {
      if (action == null) {
        continue;
      }
View Full Code Here

                tasksFinished++;
                // TODO: move this into one translatable string with arguments
                labelProgress
                  .setText(tasksFinished
                      + " " + Messages.getString("TaskDecisionPage.of") + " " + tasksTotal + " " + Messages.getString("TaskDecisionPage.tasksFinished")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
                Task task = event.getTask();
                item = list.getTableItemForTask(task);
                // FIXME This doesn't seams to work. Even if there is an exception in the sync of one item
                // the item is colored with the "successful" color.
                if (item != null) {
                  if (event.isSuccessful()) {
View Full Code Here

TOP

Related Classes of net.sourceforge.fullsync.Task

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.