#18 support class methods (static methods)

open
None
5
2002-12-21
2002-12-18
Emmanuel Touzery
No

Hello,

it would be very useful if ctags would allow to
differenciate static methods (eg class methods) from
normal methods (eg instance methods).
i also second the need for return type of a function.

thank you,

emmanuel

Discussion

  • Darren Hiebert
    Darren Hiebert
    2002-12-21

    Logged In: YES
    user_id=38016

    How would you suggest this distinction be recorded in the
    tag file?

     
  • Darren Hiebert
    Darren Hiebert
    2002-12-21

    • assigned_to: nobody --> dhiebert
     
  • Logged In: YES
    user_id=599588

    (no clue how to use this bug report page)

    i think it would be ok to add a new flag to
    --fields
    eg
    c differentiate class and instance members: add classmember=1
    for class members and functions. does not change anything for
    instance members/functions (changing the format for instance
    members/functions would inflate the tags file size too much).

    emmanuel

     
  • Darren Hiebert
    Darren Hiebert
    2002-12-24

    Logged In: YES
    user_id=38016

    Yes, you are using this page correctly.

    What is the reason you are asking for this feature? I would
    like some understanding of the reasons behind this. Are you
    doing some kind of automated processing on the output
    (perhaps through the readtags library)?

     
  • Logged In: YES
    user_id=599588

    Hello,

    I am currently writing a vim plugin for code completion for OO
    languages (partly in vimL, partly in ruby).
    see http://www.vim.org/script.php?script_id=501
    for now the plugin is very basic but future versions should be
    much more ambitious (a bit of lex/yacc parsing of a small specific
    subset of the language etc -already done-), and c-x c-p style
    completion. I need from ctags two extra features (if i don't want
    the plugin's complexity to go too high):
    * differentiate static from non-static members (completion differs
    for both)
    * return type of given method/type of given parameter.

    i tried implementing the second one (which is the most
    important) by myself, without success until now.

    thank you, emmanuel

     
  • Elliott Hughes
    Elliott Hughes
    2007-05-27

    Logged In: YES
    user_id=1127237
    Originator: NO

    my editor (http://software.jessies.org/evergreen/) needs something similar. i currently work around it by adding this to the command-line:

    "--regex-java=/(\\bstatic\\b)/\1/S/",
    "--regex-c++=/(\\bstatic\\b)/\1/S/",