Package org.eclipse.mylyn.tasks.core.data

Examples of org.eclipse.mylyn.tasks.core.data.TaskAttribute.addValue()


    TaskAttribute attribute = getTaskAttribute().getAttribute(RedmineAttribute.WATCHERS_ADD.getTaskKey());
    if (user!=null && attribute!=null) {
     
      String userId = ""+user.getId(); //$NON-NLS-1$
      if (!attribute.getValues().contains(userId) && !getTaskAttribute().getValues().contains(userId)) {
        attribute.addValue(userId);
       
        TableItem item = new TableItem(table, SWT.NONE);
        item.setText(COLUMN_IDX_ID, userId);
        item.setText(COLUMN_IDX_NAME, RedmineUtil.formatUserPresentation(user.getLogin(), user.getName()));
       
View Full Code Here


      attribute.removeValue(userId);
      return true;
    } else {
      attribute = getTaskAttribute().getAttribute(RedmineAttribute.WATCHERS_REMOVE.getTaskKey());
      if (attribute!=null && !attribute.getValues().contains(userId)) {
        attribute.addValue(userId);
      }
    }
    return false;
  }
 
View Full Code Here

          }
        } else {
          switch (redmineAttribute) {
          case WATCHERS:
            for(int watcherId : issue.getWatcherIds()) {
              taskAttribute.addValue(Integer.toString(watcherId));
            }
            break;
          default:
            break;
          }
View Full Code Here

    fillTaskData(taskData, TestData.issue2);

    //Old watchers
    TaskAttribute watchers = taskData.getRoot().getAttribute(RedmineAttribute.WATCHERS.getTaskKey());
    watchers.setValue("1");
    watchers.addValue("2");
   
    //Add a new watcher
    watchers.getAttribute(RedmineAttribute.WATCHERS_ADD.getTaskKey()).setValue("3");

    //Remove a watcher
View Full Code Here

      .setKind(attribute.getKind())
      .setLabel(attribute.getLabel())
      .setReadOnly(attribute.isReadOnly());

    if (value != null) {
      attr.addValue(value);
    }
  }

  @Override
  public boolean initializeTaskData(TaskRepository repository, TaskData data,
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.