LXR style cross references Ruby code

Discussion in 'Ruby' started by listrecv@gmail.com, Dec 12, 2005.

  1. Guest

    While trying to navigate a large, unfamiliar application, I find a
    cross referenced browser invaluable.

    For statically typed languages, there exist a whole bunch: LXR, the
    browser part of MSVC IDE, etc.

    For Ruby, are there any?

    I realize that it won't be perfect, as you can't always know excatly
    where the method is defined. But a simple algorithm which would
    certainly be at least 80/20 would be:

    1) If it is proceeded by a dot, it is a method name
    2) To guess the class of any object: If you see: variable_name =
    CapitalLetter.something, you can guess that variable_name is an
    instance of CapitalLetter
    3) To find a method definition, first look through the methods defined
    for that class (RDoc is already able to parse them), then look through
    the current file, then, through all the files required in. Failing
    that, link to a simple search page, listing all of the places where it
    is defined.

    For me, a simple browser like this makes all the difference navigating
    unfamiliar code.

    I have no experience with CTags - maybe it could be used to do
    something like this?

    ---

    PS For a radically different approach, how 'bout using Ruby to load the
    app in a sandbox, and reflect across the entire ObjectSpace to figure
    everything out? Could this be done? I know it's a lot of work -
    beyond the scope of my initial request - but, if it could, it could add
    code completion and refactoring to dynamic lang IDE's, something which
    many developers truely miss.
     
    , Dec 12, 2005
    #1
    1. Advertising

  2. Guest

    Huh?!

    I thought everyone would jump at this.

    Am I the only one who finds these type of cross references TREMENDOUSLY
    USEFUL?
     
    , Dec 13, 2005
    #2
    1. Advertising

  3. Damphyr Guest

    wrote:
    > Huh?!
    >
    > I thought everyone would jump at this.
    >
    > Am I the only one who finds these type of cross references
    > TREMENDOUSLY USEFUL?

    Maybe because RDoc does most of the cross-references you want, if only
    you follow the rules *and* you can read the code.
    So you can use your normal browser :)
    Cheers,
    V.-
    --
    http://www.braveworld.net/riva

    ____________________________________________________________________
    http://www.freemail.gr - äùñåÜí õðçñåóßá çëåêôñïíéêïý ôá÷õäñïìåßïõ.
    http://www.freemail.gr - free email service for the Greek-speaking.
     
    Damphyr, Dec 14, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. questioner
    Replies:
    0
    Views:
    340
    questioner
    May 4, 2004
  2. Roman Yakovenko

    python packages cross references

    Roman Yakovenko, Aug 17, 2004, in forum: Python
    Replies:
    1
    Views:
    283
    Peter Maas
    Aug 17, 2004
  3. qwweeeit
    Replies:
    1
    Views:
    391
    Toby Dickenson
    Feb 22, 2005
  4. Ken Varn
    Replies:
    0
    Views:
    473
    Ken Varn
    Apr 26, 2004
  5. Erwin Moller
    Replies:
    9
    Views:
    134
    Clifford Heath
    May 8, 2008
Loading...

Share This Page