Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326931 - Include browser should use the same file name as the #include directive
Summary: Include browser should use the same file name as the #include directive
Status: RESOLVED WONTFIX
Alias: None
Product: CDT
Classification: Tools
Component: cdt-indexer (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-04 10:59 EDT by Jens Elmenthaler CLA
Modified: 2010-10-07 03:01 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Elmenthaler CLA 2010-10-04 10:59:44 EDT
Build Identifier: HEAD

Consider the following code:

#include <sys/types.h>
#include <sal/types.h>

In the include browser I see types.h two times. Wouldn't it be better to show one node called sys/types.h and another node called sal/types.h?

Reproducible: Always
Comment 1 Markus Schorn CLA 2010-10-06 11:05:30 EDT
Consider two files 'a.c', 'b.c' that include the same header 'a.h':
   'a.c' uses '#include "a.h"'
   'b.c' uses '#include "subdir/a.h"'

Now, it is unclear how to present the included-by tree with your proposal:
  subdir/a.h         a.h
    |_ a.c      or    |_ a.c
    |_ b.c            |_ b.c
Comment 2 Jens Elmenthaler CLA 2010-10-06 11:14:33 EDT
(In reply to comment #1)
> Consider two files 'a.c', 'b.c' that include the same header 'a.h':
>    'a.c' uses '#include "a.h"'
>    'b.c' uses '#include "subdir/a.h"'
> Now, it is unclear how to present the included-by tree with your proposal:
>   subdir/a.h         a.h
>     |_ a.c      or    |_ a.c
>     |_ b.c            |_ b.c
See your point. The only solution I see would be to present the absolute paths. But those are usually long and, thus, affect usability.

I was just surprised at that it appeared two times. But then, I only need to double-click (in either kind of tree), and I immediately see the difference.

I would be fine with closing it. It's up to you;-)
Comment 3 Markus Schorn CLA 2010-10-07 03:01:55 EDT
(In reply to comment #2)
> ... The only solution I see would be to present the absolute paths.
> But those are usually long and, thus, affect usability.
You can use 'Show folders' from the local menu of the include browser.

> I was just surprised at that it appeared two times. But then, I only need to
> double-click (in either kind of tree), and I immediately see the difference.
> I would be fine with closing it. It's up to you;-)
I do that.