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

Universal(!)function tree-builder

Expand Messages
  • Detlef Groth
    Hello, I wish everyone a mery christmas. As a special gift follows the modification of the java-tree-builder. The function is now put into my user.emf-file,
    Message 1 of 1 , Dec 22, 2000
    • 0 Attachment
      Hello,

      I wish everyone a mery christmas.

      As a special gift follows the modification of the java-tree-builder.
      The function is now put into my user.emf-file, but the search string is
      defined in myjava.emf, also search-strings are defined in myemf.emf and
      so on so you can build navigation trees for almost every programming
      languages:

      myemf.emf:
      set-variable :searchstring "^define-macro "
      buffer-bind-key "list-functions" "f7"

      myjava.emf:
      set-variable :searchstring "^[ \t]*[a-zA-Z0-9_ ]*\([a-zA-Z0-9_
      ,]*\){\\|\\Wclass "
      buffer-bind-key "list-functions" "f7"

      myperl.emf
      set-variable :searchstring "^sub "
      buffer-bind-key "list-functions" "f7"

      and so on...

      now user.emf:
      define-macro list-functions
      set-variable .buffer $buffer-bname
      set-variable .buffer-hilight $buffer-hilight ; for keeping proper
      hilight-scheme
      delete-other-windows
      find-buffer &cat &cat "*" .buffer "functions*"
      split-window-horizontally
      25 shrink-window-horizontally
      ; to simple click the function
      set-variable :mouse-word-select "find-function"
      set-variable $buffer-hilight .buffer-hilight
      screen-update
      ; erase old-contents
      beginning-of-buffer
      set-mark
      end-of-buffer
      exchange-point-and-mark
      kill-region
      next-window-find-buffer .buffer
      set-alpha-mark "p"
      beginning-of-buffer
      !force search-forward :searchstring ; must be declared in
      my...emf-files
      !while $status ; if found put into the *function*-buffer
      beginning-of-line
      set-mark
      end-of-line
      exchange-point-and-mark
      copy-region
      end-of-line
      set-variable .function @y
      -1 yank
      set-variable .line $window-line
      next-window-find-buffer &cat &cat "*" .buffer "functions*"
      execute-string &cat &cat &cat "" .function "\t\t\t Line:" .line

      insert-newline
      next-window-find-buffer .buffer
      !force search-forward :searchstring
      !done
      goto-alpha-mark "p"
      !emacro

      define-macro find-function
      search-forward "Line:"
      set-mark
      forward-word
      exchange-point-and-mark
      copy-region
      set-variable #l0 @y
      -1 yank
      next-window
      #l0 goto-line
      recenter
      !emacro

      regards,
      Detlef
    Your message has been successfully submitted and would be delivered to recipients shortly.