Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 161085

Summary: AsynchronousTreeModel doesn't remove an item when requested
Product: [Eclipse Project] Platform Reporter: Dobrin Alexiev <dalexiev>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dobrin Alexiev CLA 2006-10-16 12:06:37 EDT
We were trying to figure out why a node appears twice in the Modules View from CDT. 
When the list of modules in my debugger changes it refreshes the modules in CDT by issuing the following sequence of commands: 

Add(x), 
Remove(x), 
Add(y)

It looked like the Remove request was ignored.
So the Modules View showed two nodes - X and Y. 

During our investigation we found is that we add node X asynchronously by 
AsynchronousTreeModel.add using AddRequestMonitor.
That delays adding the object to the map fElementToNodes. 

When Remove(x) is called it checks if it can find node X in fElementToNodes.
AsynchronousTreeModel.remove
 	ModelNode[] nodes = getNodes(element);
      if (nodes != null) {
		RemoveRequestMonitor request = new RemoveRequestMonitor..

But the node is not yet added and therefore nothing is removed.
Later on the two additions come in a row, and of course they complete successfully.

Can you please confirm if this is a real bug in the Debug Component or something in the Module View has to be done differently?

Thanks.
Comment 1 Darin Wright CLA 2006-10-16 12:21:49 EDT
Duplicate. Already fixed.

*** This bug has been marked as a duplicate of 139572 ***