Bug 172237 - [patch] [navigation] Try harder to find resolvable declaration/definition
Summary: [patch] [navigation] Try harder to find resolvable declaration/definition
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.0 M5   Edit
Assignee: Doug Schaefer CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-01-30 16:03 EST by Ed Swartz CLA
Modified: 2008-06-20 10:58 EDT (History)
0 users

See Also:


Attachments
Patch for described solution (3.06 KB, patch)
2007-01-30 16:04 EST, Ed Swartz 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 Ed Swartz CLA 2007-01-30 16:03:20 EST
Build ID: 20070129

When using F3 to open declarations/definitions, not all bindings are checked for source.  In a project that has a sufficient number of problem nodes, some bindings lack source information, or at least the existing source indicates they might.  

The Open Decl/Defn actions will only check the first binding, when it seems better from a UI perspective to try every match until something works.  

This patch converts the check on binding[0] to a loop over all the bindings.  It doesn't, of course, fix the suggestion of showing a message in the status bar on failure.  :(
Comment 1 Ed Swartz CLA 2007-01-30 16:04:02 EST
Created attachment 57856 [details]
Patch for described solution
Comment 2 Doug Schaefer CLA 2007-02-13 13:40:53 EST
Ed, do you have an example project that shows that this helps?
Comment 3 Doug Schaefer CLA 2007-02-13 13:45:10 EST
I guess it doesn't hurt. Patch applied.
Comment 4 Ed Swartz CLA 2007-02-13 14:08:35 EST
Yes, I didn't have a specific case.  :/  I just stepped through that code so many times and wondered, "Why is it only looking at the first possible choice?"  It's more a defensive change than anything else.