Examples of TaskFileEvent


Examples of rabbit.data.store.model.TaskFileEvent

  @Override
  protected TaskFileEvent createEventDiff(DateTime dateTime) {
    LocalTask task = new LocalTask("taskId", "what?");
    task.setCreationDate(dateTime.toDate());
    return new TaskFileEvent(new Interval(dateTime, dateTime.plus(1)),
        new Path("/p/f/a"), task);
  }
View Full Code Here

Examples of rabbit.data.store.model.TaskFileEvent

  @Override
  protected TaskFileEvent createEvent(DateTime dateTime) {
    LocalTask task = new LocalTask("tas1kId", "what?1");
    task.setCreationDate(dateTime.toDate());
    return new TaskFileEvent(new Interval(dateTime, dateTime.plus(2)),
        new Path("/a/b/c"), task);
  }
View Full Code Here

Examples of rabbit.data.store.model.TaskFileEvent

       * "C:/a.txt". We want workspace paths wherever possible.
       */
      if (input instanceof IFileEditorInput) {
        // Contains a file in the workspace
        IFile file = ((IFileEditorInput) input).getFile();
        return new TaskFileEvent(new Interval(start, end), file.getFullPath(), task);

      } else if (input instanceof IURIEditorInput) {
        // A file outside of workspace
        URI uri = ((IURIEditorInput) input).getURI();
        IPath path = new Path(uri.getPath());
        return new TaskFileEvent(new Interval(start, end), path, task);
      }
    }
    return null;
  }
View Full Code Here

Examples of rabbit.data.store.model.TaskFileEvent

  @Override
  public void testConvert() throws Exception {
    final ITask task = mock(ITask.class);
    given(task.getCreationDate()).willReturn(new Date());
    final TaskFileEvent event = new TaskFileEvent(
        new Interval(0, 1), new Path("/a/b"), task);
    final TaskFileEventType type = converter.convert(event);
   
    assertEquals(
        task.getHandleIdentifier(),
        type.getTaskId().getHandleId());
    assertEquals(
        task.getCreationDate(),
        type.getTaskId().getCreationDate().toGregorianCalendar().getTime());
    assertEquals(
        event.getInterval().toDurationMillis(),
        type.getDuration());
    assertEquals(
        event.getFilePath().toString(),
        type.getFilePath());
  }
View Full Code Here

Examples of rabbit.data.store.model.TaskFileEvent

    calendar.setTimeInMillis(creationDate.getTime());
   
    final XMLGregorianCalendar expected =
        DatatypeFactory.newInstance().newXMLGregorianCalendar(calendar);

    final TaskFileEvent event = new TaskFileEvent(
        new Interval(0, 1), new Path("/a/b"), task);
    TaskFileEventType type = converter.convert(event);
   
    assertThat(type.getTaskId().getCreationDate(), is(expected));
  }
View Full Code Here

Examples of rabbit.data.store.model.TaskFileEvent

@SuppressWarnings("restriction")
public class TaskFileEventTest extends FileEventTest {

  @Test(expected = NullPointerException.class)
  public void testConstructor_taskNull() {
    new TaskFileEvent(new Interval(0, 1), Path.fromPortableString("/p/a.txt"),
        null);
  }
View Full Code Here

Examples of rabbit.data.store.model.TaskFileEvent

  @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 rabbit.data.store.model.TaskFileEvent

    return createEvent(interval, filePath, new LocalTask("a", "1"));
  }

  protected TaskFileEvent createEvent(Interval interval, IPath filePath,
      ITask task) {
    return new TaskFileEvent(interval, filePath, task);
  }
View Full Code Here

Examples of rabbit.data.store.model.TaskFileEvent

    TasksUi.getTaskActivityManager().activateTask(task);
  }

  @Override
  protected TaskFileEvent createEvent() {
    return new TaskFileEvent(new Interval(0, 1), new Path("/a/b/c"), task);
  }
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.