Package org.eclipse.mylyn.tasks.core

Examples of org.eclipse.mylyn.tasks.core.ITask


        null);
  }

  @Test
  public void testGetTask() {
    ITask task = new LocalTask("abc", "def");
    assertEquals(
        task,
        new TaskFileEvent(new Interval(0, 1), Path
            .fromPortableString("/p/a.txt"), task).getTask());
  }
View Full Code Here


   
    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());
View Full Code Here

    setSection(toolkit, timeSection);
  }
 
  @Override
  public void commit(boolean onSave) {
    ITask task = getModel().getTask();
    Assert.isNotNull(task);

    TaskAttribute rootAttribute = getTaskData().getRoot();
    TaskAttribute attribute = null;

    attribute = rootAttribute.getAttribute(RedmineAttribute.DATE_DUE.getTaskKey());
    if(getModel().getChangedAttributes().contains(attribute)) {
      String dueValue = attribute.getValue();

      //Updating the Due-Date in Task-List
      if (dueValue.isEmpty()) {
        task.setDueDate(null);
      } else {
        task.setDueDate(RedmineUtil.parseDate(dueValue));
      }
    }
    super.commit(onSave);
  }
View Full Code Here

          TaskEditor taskEditorPart = (TaskEditor)editorPart;
          IFormPage page = taskEditorPart.findPage(RedmineTaskEditorPage.ID);
          if(page!=null) {

            TaskDataModel model = ((RedmineTaskEditorPage)page).getModel();
            ITask editorTask = model.getTask();
            if (editorTask!=null && (editorTask==task || editorTask.getHandleIdentifier().equals(task.getHandleIdentifier()))) {
              return model;
            }
          }
        }
      }
View Full Code Here

   */
  public String getMessage(IResource[] resources) {
    String message = ""; //$NON-NLS-1$
    if (resources == null)
      return message;
    ITask task = getCurrentTask();
    if (task == null)
      return message;
    boolean checkTaskRepository = true;
    message = TeamUiUtil.getComment(checkTaskRepository, task, resources);
    return message;
View Full Code Here

  protected ITask getCurrentTask() {
    return TasksUi.getTaskActivityManager().getActiveTask();
  }

  public String getBranchNameSuggestion() {
    ITask task = getCurrentTask();
    if (task == null)
      return null;

    String taskKey = task.getTaskKey();
    if (taskKey == null)
      taskKey = task.getTaskId();

    StringBuilder sb = new StringBuilder();
    sb.append(TasksUiInternal.getTaskPrefix(task.getConnectorKind()));
    sb.append(taskKey);
    sb.append('-');
    sb.append(task.getSummary());
    return normalizeBranchName(sb.toString());
  }
View Full Code Here

public class GoogleCodePageFactory extends AbstractTaskEditorPageFactory {

    @Override
    public boolean canCreatePageFor(TaskEditorInput input) {
        ITask task = input.getTask();
        // copy and pasted from other connectors
        return (task.getConnectorKind().equals(GoogleCodeCorePlugin.CONNECTOR_KIND) || TasksUiUtil
                .isOutgoingNewTask(task, GoogleCodeCorePlugin.CONNECTOR_KIND));
    }
View Full Code Here

      File file = new File(getStateLocation().toFile(), "incoming.xml.zip");
      try {
        FileOutputStream fos = new FileOutputStream(file);
        fos.write(data);
        List tasks = TasksUiPlugin.getTaskListManager().getTaskListWriter().readTasks(file);
        final ITask task = (ITask) tasks.get(0);
        Set repositories = TasksUiPlugin.getTaskListManager().getTaskListWriter().readRepositories(file);
        TasksUiPlugin.getRepositoryManager().insertRepositories(repositories, TasksUiPlugin.getDefault().getRepositoriesFilePath());
        IInteractionContext context = ContextCore.getContextStore().importContext(task.getHandleIdentifier(), file);
        CompoundContextActivationContributionItem.enqueue(task, context);

        IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
        Shell aShell = null;
        for (int i = 0; i < windows.length; i++) {
View Full Code Here

  }

  protected IContributionItem[] getContributionItems() {
    int count = 0;
    for (Iterator it = tasks.iterator(); it.hasNext() && count != 5;) {
      ITask task = (ITask) it.next();
      actions[count].setShell(shell);
      actions[count].setTask(task);
      count++;
    }
View Full Code Here

          if (channel == null) {
            return null;
          }
          Object element = ((IStructuredSelection) selection).getFirstElement();
          if (element instanceof ITask) {
            final ITask task = (ITask) element;
            Job job = new Job("Send Task") {
              protected IStatus run(IProgressMonitor monitor) {
                monitor.beginTask("Sending task...", 5);
                ByteArrayOutputStream stream = new ByteArrayOutputStream();
                TasksUiPlugin.getTaskListManager().getTaskListWriter().writeTask((AbstractTask) task, stream);
View Full Code Here

TOP

Related Classes of org.eclipse.mylyn.tasks.core.ITask

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.