to view the variable of javascript file

to view the variable of javascript file

6
NewbieNewbie
6

    Nov 11, 2005#1

    Hi

    I would to make display UEStudio functions and variables with a javascript file

    There is command "function list" or the "class viewer's window", but there isn't a possibility to view the variables.

    someone can help me ?
    There's the possibility to view the variable of javascript file?

    11
    Basic UserBasic User
    11

      Jan 04, 2007#2

      You cannot add a custom languages to the classviewer, so if it does not work as expected, there is nothing you can do except send a feature request to IDM.

      20
      Basic UserBasic User
      20

        Jan 04, 2007#3

        You can add custom languages to the class viewer. All the info that is displayed in the class view comes from a tag file generated by cTags.

        The parser implemented in cTags for javascript is very simple and will only show some functions and methods of an object. It is actually impossible to make good use of the class viewer with a language like javascript =( This is because there is no standard way to define classes and everything is basically an object.

        I have tried writing a parser for javascript so it would generate a proper tag file. The cTags tags file is kind of confusing and my C isn't great either =/
        A source of incoherent bullshit since 1986

        11
        Basic UserBasic User
        11

          Jan 04, 2007#4

          This is what IDM sent me in response to a question on the classviewer/ctags:

          "The Classviewer is populated based on separate integrated features and is unrelated to what you've defined in the Project menu [ctags]. There isn't currently a way to cause the special functionality you've added here [in the ctags file] to be used to populate the Classviewer, but I will ask our developers to consider this for a future release."

          I suspect that it works in your case because java is close in syntax to C. The language I am using is not, so the classviewer remains blank.

          20
          Basic UserBasic User
          20

            Jan 06, 2007#5

            1. javascript != java (and doesn't come close to it, just related by name)
            2. check the source of cTags -> jscript.c

            If that is not proof enough that cTags does a pretty pointless attempt to support javascript I don't know what is. And the files are parsed on their file extensions. Not by content. This is hard coded in the (ctags) parser you write for the particular language. There is a way around this using arguments. But hell, it is possible to create an entire regex based parser and give it as command line arguments to cTags.
            A source of incoherent bullshit since 1986