Loading ...
Sorry, an error occurred while loading the content.

Function lookup

Expand Messages
  • blade102071
    I am working on a PHP project that uses calls to MANY functions. All of the functions are held in a few include files. Does anybody know where I can find or
    Message 1 of 3 , Sep 25, 2003
    • 0 Attachment
      I am working on a PHP project that uses calls to MANY functions.
      All of the functions are held in a few include files.

      Does anybody know where I can find or how I can implement a clip that
      will allow me to do this? :

      1. Click on a function call on page A.
      2. Have a clip or whatever go to a couple of files that contain MANY
      functions all in the format of " function display_image(...list
      of params...) {" and find the function that I clicked on in page A.
      3. Grab that line of text.
      4. Display some kind of "floating" infobox that contains the line of
      text grabbed on page A.

      This way I can click on a function call and get back an "infobox"
      with the function and its parameters.

      This will make it easy to see whats required and whats optional in
      the parameter list of the function.

      Thanks...
    • Stefan Elssner
      On Thu, 25 Sep 2003 17:58:39 -0000, blade102071 ... - Try http://ctags.sourceforge.net as a starting point They provide the up-to-date
      Message 2 of 3 , Sep 26, 2003
      • 0 Attachment
        On Thu, 25 Sep 2003 17:58:39 -0000, blade102071 <blade102071@...>
        wrote:

        > I am working on a PHP project that uses calls to MANY functions.
        > All of the functions are held in a few include files.
        >
        > Does anybody know where I can find or how I can implement a clip that
        > will allow me to do this? :

        - Try http://ctags.sourceforge.net as a starting point
        They provide the up-to-date implementation of a program specialized to
        fulfill the basic needs of your task for many operating systems, incl.
        windows
        - Find / read / try to get some out of the documentation (from the package
        or on their website, I'm not sure how it's deliverd and / or what is
        better) - (If you are new to the topic, maybe try twice or so to find the
        right answer for your question ... the docs _are_ GOOD! Even if you find
        your answer not at first... try oncemore)

        Generally the 'ctags' program produces listings of function declarations
        and other programming related key objects found in the files of a directory
        and it's subdirectories, together with more or less detailed info about
        where in what file found, type of the sighting, and so on, and writes them
        to a file. Most of that (range and format of info as well as the output
        (file)) configurable.

        Below you'll find a small and fast-hacked sample of a clip utilizing ctags
        I did for myself some days ago -- it's purpose was to find all object and
        function definitions in a single given file (actual the currently open doc)
        and present this in another doc in a clickable manner (using NoteTabs
        internal 'HyperLinks' ability). Not exactly what you need, but maybe just
        another hint how to start against your task...

        (There are some pathes or sections of pathes hardcoded, maybe you'll have
        to adapt this to your needs)

        --- clip ---
        H="ctags_sample"
        ^!SetDebug ON

        ;1) create a tags file of the current doc
        ^!Set %docfilename%=^$GetDocName$
        ^!Set %tagfilename%=c:\windows\desktop\^$GetName(^%docfilename%)
        $^$GetExt(^%docfilename%)$.tags

        ;Close tagfile if open and DISCARD (this is important, ctags -f refuses to
        overwrite since, ;see man ctags)
        ^!DestroyDoc ^%tagfilename%

        ;Fire command and wait until finished
        ^!ShellWait ctags -n -f ^%tagfilename% --format=2 --fields=k
        "^%docfilename%"

        ;2) Make a linked version of the tags file in memory (write it to
        clipboard)
        ; With the format produced by the above command this means (for each
        line)
        ; - Add a '[' to the start of the 2nd column
        ; - Add '^L]' to the end of the 3rd column
        ; - Replace the delimiter between 2nd and 3rd column with '::'

        ;Empty the clipboard
        ^!SetClipboard ^%Empty%

        ^!Open ^%tagfilename%
        ;Copies the line count number to a variable
        ^!Set %MaxRow%=^$GetLineCount$
        ;Initialize variable Row to 0
        ^!Set %Row%=0
        ;Set field delimiter
        ^!SetDelimiter=^t

        ;Loop through the file lines
        :LoopStart
        ;Add one to the value contained in the Index variable
        ^!Inc %Row%
        ;End loop if value contained in Row is greater than the value contained in
        MaxRow ;(i.e. Number of lines in document)
        ^!If ^%Row% >= ^%MaxRow% EndLoop
        ; Check for comments / ctags internal infos
        ^!IfFalse ^$StrPos("!_TAG";"^$GetLine(^%Row%)$";False)$ GoOn ELSE LoopStart
        :GoOn
        ;Get fields into vars
        ^!Set %field1%=^$GetField(^%Row%;1)$
        ^!Set %field2%=^$GetField(^%Row%;2)$
        ^!Set %field3%=^$GetField(^%Row%;3)$
        ^!Set %field4%=^$GetField(^%Row%;4)$
        ; Remove ';"' from field3
        ^!Set %field3%=^$StrDeleteRight(^%field3%;2)$
        ; Build ntb goto-line hyperlink from filename and linenumber (fields 2 & 3)
        ^!Set %hyperlink%=[^%field2%::^%field3%^L]
        ;Build new line
        ^!Set %newline%=(^%field4%)^%TAB%^%field1%^%TAB%^%hyperlink%
        ; Add to clipboard
        ^!SetClipboard ^$GetClipboard$^%newline%^%NL%
        ;Jump back to the start of the loop
        ^!GoTo LoopStart
        :EndLoop

        ; 3) Overwrite the tagsfile with reworked version
        ; Sort the clipboard content
        ^!SetClipboard ^$StrSort(^$GetClipboard$;False;True;False)$
        ^!Select ALL
        ^!Paste
        ^!Save
        ^!SetCursor 1:1
        :EndClip
        --- /clip ---

        Regards
        Stefan
        --
        elssner@...
      • Christine
        Hi all! I was wondering if anyone kept the digests? I have had a very weird bug happen. I choose the word bug carefully, since no one, anywhere, has ever
        Message 3 of 3 , Sep 29, 2003
        • 0 Attachment
          Hi all!

          I was wondering if anyone kept the digests?

          I have had a very weird "bug" happen. I choose the word "bug" carefully,
          since no one, anywhere, has ever heard of this. Even I would tell you it's
          your imagination. Uninstalling software seems to delete my profile, which
          contains Outlook and Outlook Express, mail files, Favorites, Temporary
          Internet Files, settings for FTP programs, NT Back-up catalogues, and many
          more important items.

          So I lost that. I rebuilt from back-up and was working on my computer
          again. Evidently, since I mapped the drives to the back-ups, the next time
          I uninstalled something -- 2 weeks later -- it searched through all my
          drives and deleted my back-ups. My tale of woe. I find myself strangely
          grieving!

          My 5 year calendar, contacts, receipts, registrations, invoices, genealogy
          contacts, etc., are gone. Ironically, I have become a back-up fanatic.
          I've been backing up daily, refreshing every hour if I'm working. I just
          had to reboot because of stupid satellite issues, and an uninstall deleted
          the profile again. At least I have the last 3 days' work in back-up! I'm
          losing my mind on this one. But that's another rant. (Any suggestions or
          ideas?)

          Anyway, I'm looking for my lists' digests back to August 2 of 2002. If you
          happen to be an anal collector as I am, please email me privately?
          Christine@....

          I appreciate anyone's time and help. Thank you in advance!

          Christine
        Your message has been successfully submitted and would be delivered to recipients shortly.