views:

82

answers:

2

How to make etags generate tags for both the declaration (i.e. inside the @interface block) and the definition (i.e. inside the @implementation block)?

The default behavior is only to generate tags for the definition. I've already tried to invoke etags with --declarations but that didn't solve the issue. A way would be to pass a custom regexp but I'm not that familiar with the syntax used by etags.

A: 

Long shot: Have you checked out Exuberant Ctags (http://ctags.sourceforge.net/). It is a bit more powerful than ctags. I long ago made the move from etags to ctags because of it, but I have never played with Objective-C.

  • John
jwernerny
See: http://ctags.sourceforge.net/languages.html
0x4b
Here's a link to a fork of Exuberant Ctags with added objective-c support: http://github.com/mcormier/ctags-ObjC-5.8.1
jwernerny
A: 

The documentation says explicitly that tags for objective-c are "definitions for classes, class categories, methods and protocols", so I presume it's not possible normally with etags. You might be able to pull something off using the --regex option.

(GNU Global is another tagging system, which also does not support Obj-C directly.)

0x4b