Re: "Jump to definition" stopped working
Re: "Jump to definition" stopped working
- Subject: Re: "Jump to definition" stopped working
- From: Marc Epard <email@hidden>
- Date: Mon, 17 Jul 2006 07:09:13 -0500
- Thread-topic: "Jump to definition" stopped working
on 7/16/06 7:19 PM, Dave MacLachlan wrote:
> Are you aware of any bugs with XCode CodeSense and having headers
> with the same name in different directories, or even worse having
> headers in used directories with the same names as headers in system
> directories? (e.g. time.h in two places)
Are you specifying partial path names in includes? I filed rdar://4573529,
which I've appended the report below.
-Marc
> 05-Jun-2006 11:41 AM Marc Epard:
> The Code Sense Index excludes symbols in include files if the include
> specifies a partial path.
>
> Virtually all of the symbols in the code base I'm currently working with are
> in nested C++ namespaces and the file hierarchy matches the namespace nesting.
> As a result almost all of the includes look like this:
>
> #include "Name/Space/SomeClass.hpp"
>
> The partial path causes the indexer to exclude symbols in this header even
> though the compiler happily includes it. I've verified this behavior by
> looking at the Project Symbols group and by the results of Jump To Definition.
>
> SomeClass.hpp gets indexed properly if I add the Name/Space/ directory to
> USER_HEADER_SEARCH_PATHS and change the above line to:
>
> #include "SomeClass.hpp"
>
> This change is unacceptable to us, though, because this code base is shared
> across several platforms and compilers and has hundreds of header files.
>
> A work-around that seems somewhat viable is to Get Info on a header file (or
> files) and change the type to sourcecode.cpp instead of sourcecode.cpp.h, then
> selecting Include In Index. I'm guessing this causes the files to be indexed
> directly instead of by way of being included. I'm worried that it'll have
> unintended side effects, though.
>
> I'm not sure if this plays a role, but our projects have this layout:
>
> ModuleA
> Projects
> Xcode
> ModuleA.xcodeproj
> Source
> ModuleA
> Class1.hpp
> Class1.cpp
> ...
> SubModuleA
> Class2.hpp
> Class2.cpp
> ...
> SubModuleB
> <more .hpps and .cpps>
> Mac
> <Mac-sepcific .hpps and .cpps>
> Win
> <Windows-sepcific .hpps and .cpps>
>
> ModuleB
> Projects
> Xcode
> ModuleB.xcodeproj
> Source
> ModuleB
> Class3.hpp
> Class3.cpp
> ...
> SubModuleC
> Class4.hpp
> Class4.cpp
> ...
> SubModuleD
> <more .hpps and .cpps>
> Mac
> <Mac-sepcific .hpps and .cpps>
> Win
> <Windows-sepcific .hpps and .cpps>
>
> Module B's USER_HEADER_SEARCH_PATHS include:
> $(PROJECT_DIR)/../../Source/
> $(PROJECT_DIR)/../../../ModulaA/Source/
>
> And all the includes specify module and sub-module names:
> #include "ModuleA/SubModuleA/Class2.hpp"
> #include "ModuleB/SubModuleC/Class4.hpp"
>
> The module names and sub-module names are the namespaces referred to above.
>
>
>
> 'Marc's G5.spx' was successfully uploaded
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden