Community
Participate
Working Groups
TaskList.deleteCategory() deletes task data but not ITasks for AutomaticRepositoryTaskContainers. For Unsubmitted, this results in tasks that can neither be opened nor deleted, but which go away when Eclipse is restarted. I suggest adding something like the following at the beginning of the method: bc. if(category instanceof AutomaticRepositoryTaskContainer) { DeleteAction.prepareDeletion(container.getChildren()); DeleteAction.performDeletion(container.getChildren()); return; } prepareDeletion and performDeletion would have to be moved to core.
Do you have a test case to demonstrate the problem? Moving deletion logic to the core is tracked on bug 349955.
This fails on the last assertion: bc. public void testDeleteUnsubmitted() throws CoreException { TaskRepository repository = TaskTestUtil.createMockRepository(); TasksUiPlugin.getRepositoryManager().addRepository(repository); // create unsubmitted container taskList.addUnmatchedContainer(new UnmatchedTaskContainer(repository.getConnectorKind(), repository.getRepositoryUrl())); UnsubmittedTaskContainer unsubmittedContainer = taskList.getUnsubmittedContainer(repository.getRepositoryUrl()); assertEquals(0, taskList.getAllTasks().size()); TaskTask unsubmittedTask = TaskTestUtil.createMockTask("123"); taskList.addTask(unsubmittedTask, unsubmittedContainer); assertEquals(1, taskList.getAllTasks().size()); assertTrue(unsubmittedContainer.contains(unsubmittedTask.getHandleIdentifier())); taskList.deleteCategory(unsubmittedContainer); assertEquals(0, taskList.getAllTasks().size()); }
Can you push a review with the failing test?
6900: NEW - bug 385439: TaskList.deleteCategory() deletes task data but not ITasks for AutomaticRepositoryTaskContainers https://bugs.eclipse.org/bugs/show_bug.cgi?id=385439 [I9c0dd0f0] https://git.eclipse.org/r/#change,6900
Sam, do you have time to work on this?
Yes, probably, but I'm not sure what the solution is. Is it moving the deletion logic to the core?
I think so. bug 349955 seems related.
Mylyn has been restructured, and our issue tracking has moved to GitHub [1]. We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub. [1] https://github.com/orgs/eclipse-mylyn