What is 'G' in Find Symbol Name?
If I enter a class name in find symbol name, it will show Protocols, interfaces, implementations, extensions, defines etc... but it also sometimes shows something marked 'G' which when selected does not navigate anywhere. If I select show all in view, it doesn't appear and the number shown is one less than that shown in the popup.
What is G and what is it for?
Please sign in to leave a comment.
Hmm... in my project, AppCode seems to apply G to symbols declared at the file level, e.g.
//Foo.m
#import "Foo.h"
static NSString *globalString = @"myString";
@implementation Foo
@end
So my guess is that the "G" is for global. Don't know why those symbols don't jump you to a code location or appear when you show all in view. Both of those actions seem to work for me as expected (jumping to the declaration of the global variable in code, seeing the occurrence in the find panel if I show all in view).
That's what I had thought but since I was looking explicitly for (And matching) class names it seemed odd to be considered a global there.
IE:
@interface Foo : NSObject
@end
@interface Foo ()
@end
@implementation Foo
@end
would show a G for Foo.
That is odd, for sure...
There are no G-tagged class names when I try it in my project. Are you only the latest version of AppCode? If you are, then I would suggest dumping all of Appcode's indexing (File -> Invalidate Caches / Restart...) and letting it rebuild its caches. If it still does the strange G symbol behavior, it may be a bug :\
Hi Doug,
Did you try Daniel's suggestion (File -> Invalidate Caches / Restart...)
Best Regards,
Alexey
Daniel,
have you been able to solve the issue?
Hi Anton,
Thanks for following up on this! I wasn't having the issue myself, actually. I was trying to help Doug, the original poster. Not sure if he was ever able to resolve it or not.
Daniel
Oh, right, my bad.
Doug, do you need any further help with this?
Hi Anton,
I still see it but haven't really investigated much as it was a curiosity more than anything else.
OK,
please let us know if you have time and manage to find the cause, so that we could fix it.