Examples of ITask


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

@SuppressWarnings("restriction")
public class TaskLabelProviderTest extends NullLabelProviderTest {
 
  @Test
  public void getImageShouldReturnAnImageForATask() {
    ITask task = mock(ITask.class);
    assertThat(provider.getImage(task), notNullValue());
  }
View Full Code Here

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

    assertThat(provider.getImage(task), notNullValue());
  }
 
  @Test
  public void getTextShouldReturnTheSummaryOfATask() {
    ITask task = mock(ITask.class);
    given(task.getSummary()).willReturn("a summary");
    assertThat(provider.getText(task), equalTo(task.getSummary()));
  }
View Full Code Here

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

  }

  @Test
  public void getForegroundShouldReturnDarkGrayForAnUndefinedTask() {
    TaskId id = new TaskId("id", new Date());
    ITask task = new UnrecognizedTask(id);
    assertThat(provider.getForeground(task), equalTo(PlatformUI.getWorkbench()
        .getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY)));
  }
View Full Code Here

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

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

   
    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

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

    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

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

          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

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

   */
  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

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

  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

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

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
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.