• 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
Global Find > References with C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Global Find > References with C++


  • Subject: Global Find > References with C++
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 13 Oct 2016 10:32:43 -0700

I need to rename a C++ class in my project. I know Refactor doesn’t work with C++, so I need to use search/replace. I thought I’d try the “References” mode of the global Find command, but it’s returning unexpected results. It does find every(?) reference to the class, but it also finds declarations of variables of this type and considers the entire expression a match.

For instance, the class name is Document. On the source line
        Document doc = localDocs.get(key);
it finds one correct match for the string ‘Document’ at the start of the line. This match has a “[C]” icon in the results pane.
But it also finds _another_ match consisting of the entire line. This one has a “[M]” icon.

I’m guessing that it considers the Document class’s constructors to be instances of the same symbol (since they’re named ‘Document(…)’) and is highlighting expressions that call them. That’s not very useful. In order to do the replacement I’m going to have to manually deselect all of these results from the entire list of 205 :(

Is it worth filing a bug report?

—Jens
 _______________________________________________
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: Global Find > References with C++
      • From: Michael David Crawford <email@hidden>
  • Prev by Date: App refuses to find Framework's Objective-C Generated Header: whats wrong?
  • Next by Date: Re: Global Find > References with C++
  • Previous by thread: Re: App refuses to find Framework's Objective-C Generated Header: whats wrong?
  • Next by thread: Re: Global Find > References with C++
  • Index(es):
    • Date
    • Thread