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

Examples of org.eclipse.mylyn.tasks.core.data.ITaskDataManager


  private Map<String, String> buildStatusMap() {

    Map<String, String> statusMap = null;
    List<ITask> tasks = getSelectedTasks();
   
    ITaskDataManager taskDataManager = TasksUi.getTaskDataManager();
   
    try {
      if (tasks.size()>0) {
        ITask firstTask = tasks.get(0);
        String repositoryUrl = firstTask.getRepositoryUrl();
       
        if (repositoryUrl!=null && taskDataManager.hasTaskData(firstTask)) {
          TaskData taskData = taskDataManager.getTaskData(firstTask);
          TaskAttribute attribute = taskData.getRoot().getAttribute(RedmineAttribute.STATUS.getTaskKey());
          Set<String> commonIds = new HashSet<String>(attribute.getOptions().keySet());
         
          for (ITask task : tasks) {
            if (task.getRepositoryUrl().equals(repositoryUrl)) { //Same-Repository-Policy
              if (taskDataManager.hasTaskData(task)) {
                taskData = taskDataManager.getTaskData(task);
                attribute = taskData.getRoot().getAttribute(RedmineAttribute.STATUS.getTaskKey());
                commonIds.retainAll(attribute.getOptions().keySet());
              }
            } else {
              return null; //Same-Repository-Policy
View Full Code Here


  }

 
  @Override
  public void run() {
    ITaskDataManager taskDataManager = TasksUi.getTaskDataManager();
    TaskRepository repository = TasksUi.getRepositoryManager().getRepository(RedmineCorePlugin.REPOSITORY_KIND, tasks[0].getRepositoryUrl());
   
    for (ITask task : tasks) {
      if(taskDataManager.hasTaskData(task)) {
        String attributeName = null;
        try {
         
          boolean openTask = true;
          TaskDataModel model = RedmineTasksUiUtil.findOpenTaskModel(task);
         
          if(model==null) {
            openTask = false;
            ITaskDataWorkingCopy copy = taskDataManager.getWorkingCopy(task);
            model = new TaskDataModel(repository, task, copy);
          }

          TaskData taskData = model.getTaskData();
         
View Full Code Here

TOP

Related Classes of org.eclipse.mylyn.tasks.core.data.ITaskDataManager

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.