Examples of ITask


Examples of com.github.sommeri.less4j.core.compiler.scopes.InScopeSnapshotRunner.ITask

    doSolveReferences(node, new IteratedScope(scope));
  }

  private void doSolveReferences(final ASTCssNode node, final IteratedScope scope) {
    // ... and I'm starting to see the point of closures ...
    InScopeSnapshotRunner.runInLocalDataSnapshot(scope, new ITask() {

      @Override
      public void run() {
        unsafeDoSolveReferences(node, scope);
      }
View Full Code Here

Examples of com.github.sommeri.less4j.core.compiler.scopes.InScopeSnapshotRunner.ITask

    final ReusableStructure mixin = fullMixin.getMixin();
    final GeneralBody bodyClone = mixin.getBody().clone();
    final IScope scope = fullMixin.getScope();

    InScopeSnapshotRunner.runInLocalDataSnapshot(scope, new ITask() {

      @Override
      public void run() {
        // Referenced namespace attempts to import its own mixins. Do not
        // try to compile it.
View Full Code Here

Examples of com.github.sommeri.less4j.core.compiler.scopes.InScopeSnapshotRunner.ITask

    for (final FullMixinDefinition fullMixin : mixins) {
      final ReusableStructure mixin = fullMixin.getMixin();
      final IScope mixinScope = fullMixin.getScope();

      // the following needs to run in snapshot because calculateMixinsWorkingScope modifies that scope
      InScopeSnapshotRunner.runInLocalDataSnapshot(mixinScope.getParent(), new ITask() {

        @Override
        public void run() {
          // add arguments
          IScope mixinArguments = buildMixinsArguments(reference, callerScope, fullMixin);
View Full Code Here

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

        case DATE:
          segments.add(data.get(ITaskData.DATE));
          break;
        case TASK:
          TaskId id = data.get(ITaskData.TASK_ID);
          ITask task = repository.getTask(id.getHandleIdentifier());
          if (task == null
              || !Objects.equal(id.getCreationDate(), TasksContract.getCreationDate(task))) {
            task = new UnrecognizedTask(id);
          }
          segments.add(task);
View Full Code Here

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

    return DataHandler.getStorer(TaskFileEvent.class);
  }

  @Override
  protected TaskFileEvent tryCreateEvent(long start, long end, IWorkbenchPart part) {
    ITask task = TasksUi.getTaskActivityManager().getActiveTask();
    if (task == null) {
      return null;
    }
    if (part instanceof IEditorPart) {
      IEditorInput input = ((IEditorPart) part).getEditorInput();
View Full Code Here

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

    return new TaskFileEventConverter();
  }

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

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

   */
  @Test
  public void aTaskWithoutCreationDateShouldBeAssignedWithNonNullDateFromTasksContract()
      throws Exception {
   
    final ITask task = mock(ITask.class);
    given(task.getCreationDate()).willReturn(null);
   
    final Date creationDate = TasksContract.getCreationDate(task);
    assertTrue(creationDate != null);
   
    final GregorianCalendar calendar = new GregorianCalendar();
View Full Code Here

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

public final class TasksContractTest {

  @Test
  public void getCreationDateReturnsDateCopies() throws Exception {
    final ITask task = mock(ITask.class);
    final Date date1 = TasksContract.getCreationDate(task);
    final Date date2 = TasksContract.getCreationDate(task);

    assertTrue(date1 != date2);
  }
View Full Code Here

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

  @Test
  public void getCreationDateShouldReturnTheEarliestDateIfTashHasNoCreationDate()
      throws Exception {

    final Date expectedDate = new Date(0);
    final ITask task = mock(ITask.class);
    given(task.getCreationDate()).willReturn(null);

    assertThat(TasksContract.getCreationDate(task), is(expectedDate));
  }
View Full Code Here

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

  @Test
  public void getCreationDateShouldReturnTheTaskCreationDateIfThereIsOne()
      throws Exception {

    final Date expectedDate = new Date();
    final ITask task = mock(ITask.class);
    given(task.getCreationDate()).willReturn(expectedDate);

    assertThat(TasksContract.getCreationDate(task), is(expectedDate));
  }
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.