| Summary: | [api] guard against circular dependencies (sub-tasks) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Robert Elves <robert.elves> | ||||||
| Component: | Mylyn | Assignee: | Robert Elves <robert.elves> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P2 | CC: | mjmeijer, steffen.pingel | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | 3.0 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Robert Elves
FYI: There is a cyclic dependency check in AbstractTaskContainerPropertySource.java in method public boolean containsCyclic(AbstractTaskContainer parent) in the sandbox.dev tools. Maybe its a question of moving this functionality. See bug 210639 Steffen, I will have a look at creating a patch for this. Created attachment 95273 [details]
patch
I have attached a patch that removes the MAX_SUBTASK_DEPTH constant and uses a depth first search of the hierarchy. This is similar to Maarten's approach. There were more changes than expected, so it would be good to have this code reviewed carefully.
Created attachment 95274 [details]
mylyn/context/zip
Thanks Shawn. I have applied the part of the patch that touches tasks.core and tasks.tests. I would like to work on the task list model first before we take a look at the UI classes that traverse the task list. Rob, reassigning to you. This is related to implementing a concurrency model that ensures that the task list data model never has cycles. TaskList.addTask() now validates any modifications made to the task list model and does not allow cycles anymore. |