Ignore:
Timestamp:
07/26/13 08:29:32 (11 years ago)
Author:
pharms
Message:
  • added some Java Docs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/ShowTaskTreeDialog.java

    r1262 r1275  
    5050/** 
    5151 * <p> 
    52  * TODO comment 
     52 * a dialog to inspect the tasks and task instances of a task model 
    5353 * </p> 
    5454 *  
     
    5757public class ShowTaskTreeDialog extends Dialog { 
    5858 
    59     /** */ 
     59    /** the main shell */ 
    6060    protected Shell shell; 
    6161     
    62     /** */ 
     62    /** the tree of task instances on the left */ 
    6363    private Tree instanceTree; 
    6464     
    65     /** */ 
     65    /** the tree of tasks (model) on the right*/ 
    6666    private Tree modelTree; 
    6767 
    68     /** */ 
     68    /** the displayed task model */ 
    6969    protected ITaskModel taskModel; 
    7070 
    7171    /** 
    72      *  
     72     * creates the dialog 
    7373     */ 
    7474    public ShowTaskTreeDialog(Shell parent, int style, ITaskModel taskModel, String taskTreeName) { 
     
    7979 
    8080    /** 
    81      *  
     81     * displays the dialog 
    8282     */ 
    8383    public void open() { 
     
    9494 
    9595    /** 
    96      *  
     96     * creates the two views, one on the task instances on the left, on on the task models on the 
     97     * right. Also adds a selection adapter to the task instances so that for a selected task 
     98     * instance always the respective model is presented. 
    9799     */ 
    98100    private void createContents() { 
     
    154156 
    155157    /** 
    156      *  
     158     * convenience method for creating the display of the instances 
    157159     */ 
    158160    private void buildInstanceTree() { 
     
    169171 
    170172    /** 
    171      *  
     173     * convenience method for creating the display of the instances 
    172174     */ 
    173175    private void buildInstanceTree(TreeItem currentParent, ITaskInstanceList taskInstanceList) { 
     
    182184 
    183185    /** 
    184      *  
     186     * convenience method for creating the display of the task model 
    185187     */ 
    186188    private void buildModelTree(ITaskModel taskModel) { 
     
    213215 
    214216    /** 
    215      *  
     217     * convenience method for creating the display of the task model 
    216218     */ 
    217219    private void buildModelTree(ITaskInstance taskInstance) { 
     
    227229 
    228230    /** 
    229      * 
     231     * reduces the list of tasks in a model so that it only contains root nodes and that it is  
     232     * sorted starting with the most complex task first  
    230233     */ 
    231234    private List<ITask> createSortedTaskList(Collection<ITask> tasks) { 
     
    241244            @Override 
    242245            public int compare(ITask task1, ITask task2) { 
    243                 return depth(task1) - depth(task2); 
     246                return depth(task2) - depth(task1); 
    244247            } 
    245248 
     
    263266 
    264267    /** 
    265      * 
     268     * convenience method for removed all non root tasks of the provided list 
    266269     */ 
    267270    private void removeChildren(ITask task, Set<ITask> result) { 
     
    269272            for (ITask child : ((IStructuringTemporalRelationship) task).getChildren()) { 
    270273                result.remove(child); 
    271                 //removeChildren(child, result); 
    272274            } 
    273275        } 
    274276        else if (task instanceof IMarkingTemporalRelationship) { 
    275277            result.remove(((IMarkingTemporalRelationship) task).getMarkedTask()); 
    276             //removeChildren(((IMarkingTemporalRelationship) task).getMarkedTask(), result); 
    277         } 
    278     } 
    279  
    280     /** 
    281      *  
     278        } 
     279    } 
     280 
     281    /** 
     282     * expands all nodes in the tree 
    282283     */ 
    283284    private void expandAll(Tree tree, boolean expanded) { 
     
    288289 
    289290    /** 
    290      *  
     291     * expands all nodes in the tree 
    291292     */ 
    292293    private void expandAll(TreeItem item, boolean expanded, int maxChildrenToExpand) { 
     
    305306     
    306307    /** 
    307      *  
     308     * ensures, that the children of a specific node are loaded 
    308309     */ 
    309310    private void ensureChildren(TreeItem parent) { 
     
    333334 
    334335    /** 
    335      * 
     336     * convenience method to create a tree item for a task 
    336337     */ 
    337338    private void createTreeItemFor(ITask task, TreeItem parent) { 
Note: See TracChangeset for help on using the changeset viewer.