[SVN] r7088 (C)

Allan Odgaard throw-away-1 at macromates.com
Mon Apr 30 05:10:24 UTC 2007


New version which:

 1. First find header as:
    a. selection if any, search domain is ‘all’
    b. quoted string on #include/#import line, search domain is ‘user’/‘system’ depending on quoting style
    c. use TextMate::UI.request_string, search domain is ‘all’
 2. Then find search path as:
    a. if domain is ‘user’, check TM_USR_HEADER_PATH
    b. if domain is ‘system’, check TM_SYS_HEADER_PATH
    c. if domain is ‘all’, join the two variables
 3. If #2 gave no directories, run gcc/g++ (depending on scope) and parse the output to find the header search path (corresponding to domain).
 4. If the header is a path, like “A/B.h”, we also search for “A.framework/Headers/B.h”.

Possible improvements:
 • allow the user to augment the search path, as #2 (above) is not ideal for only adding, since we need to provide the full search path, and since #3 is instant (on my system) there is really no advantage in “caching” the result
 • allow the user to set a SDK prefix (Chris, you really need this? :) )
 • when we find an Xcode project, add the following to the search path:
   1. “«product build directory»/«configuration»”
   2. “«product build directory»/«target».build/«configuration»/«target».build/DerivedSources”
   3. HEADER_SEARCH_PATHS and USER_HEADER_SEARCH_PATHS (from project.pbxproj)

Changed:
U   trunk/Bundles/C.tmbundle/Commands/Quick Open.plist



More information about the textmate-dev mailing list