Changeset 1275 for trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/ShowTaskTreeDialog.java
- Timestamp:
- 07/26/13 08:29:32 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-ui-swt/src/main/java/de/ugoe/cs/autoquest/ui/swt/ShowTaskTreeDialog.java
r1262 r1275 50 50 /** 51 51 * <p> 52 * TODO comment52 * a dialog to inspect the tasks and task instances of a task model 53 53 * </p> 54 54 * … … 57 57 public class ShowTaskTreeDialog extends Dialog { 58 58 59 /** */59 /** the main shell */ 60 60 protected Shell shell; 61 61 62 /** */62 /** the tree of task instances on the left */ 63 63 private Tree instanceTree; 64 64 65 /** */65 /** the tree of tasks (model) on the right*/ 66 66 private Tree modelTree; 67 67 68 /** */68 /** the displayed task model */ 69 69 protected ITaskModel taskModel; 70 70 71 71 /** 72 * 72 * creates the dialog 73 73 */ 74 74 public ShowTaskTreeDialog(Shell parent, int style, ITaskModel taskModel, String taskTreeName) { … … 79 79 80 80 /** 81 * 81 * displays the dialog 82 82 */ 83 83 public void open() { … … 94 94 95 95 /** 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. 97 99 */ 98 100 private void createContents() { … … 154 156 155 157 /** 156 * 158 * convenience method for creating the display of the instances 157 159 */ 158 160 private void buildInstanceTree() { … … 169 171 170 172 /** 171 * 173 * convenience method for creating the display of the instances 172 174 */ 173 175 private void buildInstanceTree(TreeItem currentParent, ITaskInstanceList taskInstanceList) { … … 182 184 183 185 /** 184 * 186 * convenience method for creating the display of the task model 185 187 */ 186 188 private void buildModelTree(ITaskModel taskModel) { … … 213 215 214 216 /** 215 * 217 * convenience method for creating the display of the task model 216 218 */ 217 219 private void buildModelTree(ITaskInstance taskInstance) { … … 227 229 228 230 /** 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 230 233 */ 231 234 private List<ITask> createSortedTaskList(Collection<ITask> tasks) { … … 241 244 @Override 242 245 public int compare(ITask task1, ITask task2) { 243 return depth(task 1) - depth(task2);246 return depth(task2) - depth(task1); 244 247 } 245 248 … … 263 266 264 267 /** 265 * 268 * convenience method for removed all non root tasks of the provided list 266 269 */ 267 270 private void removeChildren(ITask task, Set<ITask> result) { … … 269 272 for (ITask child : ((IStructuringTemporalRelationship) task).getChildren()) { 270 273 result.remove(child); 271 //removeChildren(child, result);272 274 } 273 275 } 274 276 else if (task instanceof IMarkingTemporalRelationship) { 275 277 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 282 283 */ 283 284 private void expandAll(Tree tree, boolean expanded) { … … 288 289 289 290 /** 290 * 291 * expands all nodes in the tree 291 292 */ 292 293 private void expandAll(TreeItem item, boolean expanded, int maxChildrenToExpand) { … … 305 306 306 307 /** 307 * 308 * ensures, that the children of a specific node are loaded 308 309 */ 309 310 private void ensureChildren(TreeItem parent) { … … 333 334 334 335 /** 335 * 336 * convenience method to create a tree item for a task 336 337 */ 337 338 private void createTreeItemFor(ITask task, TreeItem parent) {
Note: See TracChangeset
for help on using the changeset viewer.