Bug 94989 - Binary Search in Find in DOM AST VIew doesn't always work
Summary: Binary Search in Find in DOM AST VIew doesn't always work
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0   Edit
Assignee: Andrew Niefer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-05-12 12:22 EDT by Andrew Niefer CLA
Modified: 2008-06-18 19:20 EDT (History)
2 users (show)

See Also:


Attachments
fix for this PR (48.40 KB, patch)
2005-07-20 10:35 EDT, Devin Steffler CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Niefer CLA 2005-05-12 12:22:50 EDT
As we talked about, preprocessor nodes that are not in the correct place in the
tree can cause the binary search to not find the node we are looking for.
Comment 1 Devin Steffler CLA 2005-07-20 10:33:26 EDT
This is the test that I've been using for this PR:

#include <stdio.h>

#define ONE

int foo() {
	#ifdef ONE
		return 1; // select 1 and perform "Show IASTNode in DOM View"
	#else
		return 0;
	#endif
}
Comment 2 Devin Steffler CLA 2005-07-20 10:35:53 EDT
Created attachment 25043 [details]
fix for this PR

Take a look at this PR as I think that it is a large improvement for finding
the IASTNodes in the DOM AST View.  Also, the only changes made are to the DOM
AST View in the ui.tests.
Comment 3 Devin Steffler CLA 2005-07-20 10:37:23 EDT
Take a look at the attached patch.  If you find any IASTNodes that can't be 
found in the DOM AST View which can be selected in the DOM AST View and have 
the proper corresponding text selected in the source code then there should 
probably be a separate bug raised for that example.
Comment 4 Andrew Niefer CLA 2005-07-25 14:42:51 EDT
applied modified version of patch.