Ignore:
Timestamp:
09/26/14 10:43:43 (10 years ago)
Author:
pharms
Message:
  • improved logging
  • support for discarding task instances
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskBuilder.java

    r1422 r1765  
    7373        { 
    7474            throw new IllegalArgumentException 
    75                 ("the task of the child instance to be added does not belong to the children " + 
    76                  "of the task of the parent instance"); 
     75                ("the task of the child instance (" + child.getTask() + ") is not a valid child " + 
     76                 "of the task of the parent instance (" + parentTask + ")"); 
    7777        } 
    7878 
     
    506506 
    507507    /* (non-Javadoc) 
     508     * @see ITaskBuilder#discardTaskInstance(ITaskInstance) 
     509     */ 
     510    @Override 
     511    public void discardTaskInstance(ITaskInstance taskInstance) { 
     512        if (!(taskInstance instanceof TaskInstance)) { 
     513            throw new IllegalArgumentException 
     514                ("illegal type of task instance provided: " + taskInstance.getClass()); 
     515        } 
     516         
     517        ((Task) ((TaskInstance) taskInstance).getTask()).removeInstance(taskInstance); 
     518    } 
     519 
     520    /* (non-Javadoc) 
    508521     * @see ITaskTreeBuilder#replaceChild(ISelection, ITaskTreeNode, ITaskTreeNode) 
    509522     */ 
Note: See TracChangeset for help on using the changeset viewer.