• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDC this year)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDC this year)


  • Subject: Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDC this year)
  • From: Laurence Harris <email@hidden>
  • Date: Thu, 20 Jul 2006 11:56:35 -0400


On Jul 20, 2006, at 10:53 AM, Chris Espinosa wrote:


On Jul 20, 2006, at 2:49 AM, Laurence Harris wrote:

On Jul 19, 2006, at 1:57 PM, glenn andreas wrote:

The responses I'm getting seem to be making my point. So far I've gotten three replies to my question and each time someone points me to the Options window*, but no one has told me how to configure a search of the headers. I'm sure it can be done, but IMO, it would be obvious how to do so if Xcode's Find system were designed better, and it says something that no one has actually explained how to do it.

Let's take a quick stab at it - bring up the options window. We want to make a new "Find Set", so click "Add..." and type in "In Project Headers".


Click the radio button that says "Filter files using regex patterns:". Click in the first column next to the pattern "\.(h| H|hxx|hpp|i)$" so that the value is "=".

Close window.  Done.

Now just select "In Project Headers" in the popup when you want to only search in the project headers.

Thank you. :-)

Now, while this does work, it is far less than ideal because:

- Amazingly enough, not everyone is comfortable with regexp. Something this basic shouldn't require regexp (or the use of a second window) IMO. This is one of the things I intensely dislike about Xcode: it just isn't user friendly. You can do what you need to do, but even simple things tend to be buried in some not-very- Mac-like interface that offers a lot of power and flexibility -- assuming you can figure out how to use it.

- An option that requires a visit to the Options window is an option that can't easily be added to another search. For example, suppose I have three find sets defined, and I use them when searching the headers sometimes and source files at other times. It sounds like Xcode is going to make me set up six find sets instead of just letting me set up three and turn a check box on and off in the main Find window.

Larry, either you're not reading what people write very carefully or not trying this at home.

I don't know why you would say this. Glenn's solution is the only one anyone's given me to try and I had tried it (which is why I said it works).


In three simple steps:

1) In any project, do Find in Project and click Options.
2) Click "Add..." and enter the name "Headers".
3) Set the radio buttons and check box to "Search in files and folders", press the (+) button under its list, and add "/usr/ include" to the list.

Yes, these are simple steps, but they doesn't work because usr isn't listed in the open file dialog Xcode presents. I only see Applications, Developer, Library, System, Users, an alias to User Guides And Information, and a few folders I've created, the exactly same items I see when I open the root directory of my system volume in the Finder. Apparently Xcode isn't having Nav Services show invisible folders. Am I missing something obvious?


Read carefully:
- Note that no RegExes were harmed in the making of this Options set.
- The Project Find popup now has an entry for "Headers" that you can use without ever clicking "Options" again.
- The find set is stored in your user prefs, and is available for all projects.

For the sake of discussion we'll assume it's in my popup, but an inherent limitation in this approach is that I can't choose multiple configurations from that popup to be used in the same search. If I use my "System Headers" find set I can't use any of the other find sets I might have created. Right? This is a big reason I think common options like my headers, system headers, and source files should be checkboxes in the main window.


http://developer.apple.com/documentation/DeveloperTools/Conceptual/ XcodeUserGuide/Contents/Resources/en.lproj/01_07_pr_navigate/ chapter_10_section_2.html#//apple_ref/doc/uid/TP40002669-BABDIJCC

There are admittedly a lot of things that suck about the Project Find window, but it is not hard to set it up to create searches in arbitrary folders.

Unless, apparently, they're invisible. :-)

Larry

_______________________________________________
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


  • Follow-Ups:
    • Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDC this year)
      • From: "Sean McBride" <email@hidden>
    • Re: Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDC this year)
      • From: "Shawn Erickson" <email@hidden>
    • Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDCthis year)
      • From: "James Larcombe" <email@hidden>
References: 
 >Re: [ANN] Xcode + Leopard at WWDC this year (From: Ruslan Zasukhin <email@hidden>)
 >Re: [ANN] Xcode + Leopard at WWDC this year (From: "Andy O'Meara" <email@hidden>)
 >Re: [ANN] Xcode + Leopard at WWDC this year (From: "Sean McBride" <email@hidden>)
 >Re: [ANN] Xcode + Leopard at WWDC this year (From: Laurence Harris <email@hidden>)
 >Re: Re: [ANN] Xcode + Leopard at WWDC this year (From: "Shawn Erickson" <email@hidden>)
 >Re: [ANN] Xcode + Leopard at WWDC this year (From: Laurence Harris <email@hidden>)
 >Re: Re: [ANN] Xcode + Leopard at WWDC this year (From: "Shawn Erickson" <email@hidden>)
 >Re: [ANN] Xcode + Leopard at WWDC this year (From: Laurence Harris <email@hidden>)
 >Re: [ANN] Xcode + Leopard at WWDC this year (From: Chris Espinosa <email@hidden>)
 >Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDC this year) (From: Laurence Harris <email@hidden>)
 >Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDC this year) (From: glenn andreas <email@hidden>)
 >Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDC this year) (From: Laurence Harris <email@hidden>)
 >Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDC this year) (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: Building a library using as universal for 10.3.9 ppc from an Intel build box
  • Next by Date: Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDCthis year)
  • Previous by thread: Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDC this year)
  • Next by thread: Re: Setting up searches in Xcode (Re: [ANN] Xcode + Leopard at WWDCthis year)
  • Index(es):
    • Date
    • Thread