Examples of AbstractTask


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

                Object o = ss.getFirstElement();
                if (o instanceof AbstractTask){                 
               
                  Display.getDefault().asyncExec(new Thread(new Runnable(){
              public void run() {
                AbstractTask t = TasksUiPlugin.getTaskListManager().
                        getTaskList().getActiveTask();
               
                if(t!=null){
                  TwipsePlugin.getDefault().
                    getClient().postStatusUpdate(
                      new Status(t.getSummary()+" - "+t.getUrl()));
                }
              }
                   
                  }));
                }
View Full Code Here

Examples of org.eclipse.ui.internal.cheatsheets.composite.model.AbstractTask

        }
      }    
            if (ref.equals(SKIP_HREF)) {
        Object data = descriptionPanel.getControl().getData(ICompositeCheatsheetTags.TASK);
        if (data instanceof AbstractTask) {
            AbstractTask task = (AbstractTask)data;
            task.setState(ICompositeCheatSheetTask.SKIPPED);
        }
      }
      if (ref.equals(REVIEW_TAG)) {
        Object data = descriptionPanel.getControl().getData(ICompositeCheatsheetTags.TASK);
        if (data instanceof EditableTask) {
            reviewTask((EditableTask) data);
        }
      }
      if (ref.startsWith(GOTO_TASK_TAG)) {
        String next = ref.substring(GOTO_TASK_TAG.length());
        AbstractTask nextTask =
            model.getDependencies().getTask(next);
        currentExplorer.setSelection
            (new StructuredSelection(nextTask), true);       
      }
    }
View Full Code Here

Examples of org.eclipse.ui.internal.cheatsheets.composite.model.AbstractTask

  private final class EndReviewListener extends HyperlinkAdapter {
    public void linkActivated(HyperlinkEvent e) {
      String ref = (String)e.getHref();
      if (ref.startsWith(END_REVIEW_TAG)) {
        String next = ref.substring(END_REVIEW_TAG.length());
        AbstractTask task =
            model.getDependencies().getTask(next);
        endReview((EditableTask)task);     
      }
    }
View Full Code Here

Examples of org.eclipse.ui.internal.cheatsheets.composite.model.AbstractTask

  public void parsingComplete(AbstractTask parentTask, IStatusContainer status) {
    String kind = parentTask.getKind();
    if (ITaskGroup.SEQUENCE.equals(kind)) {
      // Create dependencies between the children
      ICompositeCheatSheetTask[] children  = parentTask.getSubtasks();
      AbstractTask previous = null;
      AbstractTask next = null;
      for (int i = 0; i < children.length; i++) {
        previous = next;
        next = (AbstractTask)children[i];
        if (previous != null) {
          next.addRequiredTask(previous);
        }
      }
      checkForChildren(parentTask, status);
    } else if (ITaskGroup.SET.equals(kind)) {
      checkForChildren(parentTask, status);
View Full Code Here

Examples of org.eclipse.ui.internal.cheatsheets.composite.model.AbstractTask

    nextTaskId = 0;
    NodeList childNodes = compositeCSNode.getChildNodes();
    for (int index = 0; index < childNodes.getLength(); index++) {
      Node nextNode = childNodes.item(index);
      if (isAbstractTask(nextNode.getNodeName()) ) {
        AbstractTask task = parseAbstractTask(nextNode, model);
          if (model.getRootTask() == null ) {
          model.setRootTask(task);
          parseTaskChildren(nextNode, task, model);
          } else {
            addStatus(IStatus.ERROR, Messages.ERROR_PARSING_MULTIPLE_ROOT, null);
View Full Code Here

Examples of org.eclipse.ui.internal.cheatsheets.composite.model.AbstractTask

          parentTask.setCompletionMessage(MarkupParser.parseAndTrimTextMarkup(childNode));           
        } else if (nodeName == ICompositeCheatsheetTags.DEPENDS_ON) {
          parseDependency(childNode, parentTask, model);
        } else if (CompositeCheatSheetParser.isAbstractTask(nodeName)) {
          if (parentTask instanceof TaskGroup) {
              AbstractTask task = parseAbstractTask(childNode, model);
              ((TaskGroup)parentTask).addSubtask(task);
              parseTaskChildren(childNode, task, model);
          }
          } else {
          if (!strategy.parseElementNode(childNode, parentNode, parentTask, this)) {
View Full Code Here

Examples of org.eclipse.ui.internal.cheatsheets.composite.model.AbstractTask

    }
   
  }

  private AbstractTask parseAbstractTask(Node taskNode, CompositeCheatSheetModel model) {
    AbstractTask task;
    NamedNodeMap attributes = taskNode.getAttributes();
    String kind = null;
    String name = null;
    String id = null;
    boolean skippable = false;
    if (attributes != null) {
      for (int x = 0; x < attributes.getLength(); x++) {
        Node attribute = attributes.item(x);
        String attributeName = attribute.getNodeName();
        if (attribute == null || attributeName == null)
          continue;
        if (attributeName.equals(ICompositeCheatsheetTags.KIND)) {
          kind = attribute.getNodeValue();
        }
        if (attributeName.equals(ICompositeCheatsheetTags.NAME)) {
          name= attribute.getNodeValue();
        }
        if (attributeName.equals(IParserTags.ID)) {
          id = attribute.getNodeValue();
        }     
        if (attributeName.equals(IParserTags.SKIP)) {
          skippable = "true".equalsIgnoreCase(attribute.getNodeValue()); //$NON-NLS-1$
        }       
      }
    }

    String nodeName = taskNode.getNodeName();
    if (id == null) {
      id = autoGenerateId();
    }
    if (name == null) {
      String message = NLS.bind(Messages.ERROR_PARSING_TASK_NO_NAME, (new Object[] {nodeName}));
      addStatus(IStatus.ERROR, message, null);
    }
    task = createTask(nodeName, model, kind, id, name);
    task.setSkippable(skippable);

    if (model.getDependencies().getTask(id) != null) {
      String message = NLS.bind(Messages.ERROR_PARSING_DUPLICATE_TASK_ID, (new Object[] {id, }));
      addStatus(IStatus.ERROR, message, null);
    } else {
View Full Code Here

Examples of org.eclipse.ui.internal.cheatsheets.composite.model.AbstractTask

    return task;
  }

  private AbstractTask createTask(String nodeKind, CompositeCheatSheetModel model, String kind, String id, String name) {
    AbstractTask task;
    if (ICompositeCheatsheetTags.TASK_GROUP.equals(nodeKind)) {
      task = new TaskGroup(model, id, name, kind);
    } else {
      task = new EditableTask(model, id, name, kind);
    }
    task.setCompletionMessage(Messages.COMPLETED_TASK);
    return task;
  }
View Full Code Here

Examples of org.gradle.api.internal.AbstractTask

        GroovyTaskTestHelper.checkAddActionsWithClosures(getTask());
    }

    @Test
    public void testExecuteDelegatesToTaskExecuter() {
        final AbstractTask task = getTask();

        final TaskExecuter executer = context.mock(TaskExecuter.class);
        task.setExecuter(executer);

        context.checking(new Expectations(){{
            one(executer).execute(with(sameInstance(task)), with(notNullValue(TaskStateInternal.class)));
        }});

        task.execute();
    }
View Full Code Here

Examples of org.gradle.api.internal.AbstractTask

        assertEquals(testDescription, getTask().getDescription());
    }

    @Test
    public void canSpecifyOnlyIfPredicateUsingClosure() {
        AbstractTask task = getTask();
        assertTrue(task.getOnlyIf().isSatisfiedBy(task));

        task.onlyIf(HelperUtil.toClosure("{ task -> false }"));
        assertFalse(task.getOnlyIf().isSatisfiedBy(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.