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

307java-class/function-tree

Expand Messages
  • Detlef Groth
    Dec 13, 2000
    • 0 Attachment
      Hello,
      almost christmas....,

      I am trying to build a tree of java-classes and it's function
      for easy navigating.
      Until no I only get the functions because:

      !force search-forward "^ [a-zA-Z].*\(.*\){"

      only get's the function's
      like:
      public void paint(Graphics g){
      etc.

      I tried to get eigther a function or a class like
      !force search-forward "(^ [a-zA-Z].*\(.*\){\| *class)"
      but it does not work.

      Any suggestions ?

      Best regards, Detlef

      My code altogether:

      define-macro list-java-functions
      ;set-variable $debug 1
      set-variable .buffer $buffer-bname
      delete-other-windows
      ; erase old-contents
      find-buffer &cat &cat "*" .buffer "functions*"
      split-window-horizontally
      25 shrink-window-horizontally
      set-variable :mouse-word-select "find-java-function"

      set-variable $buffer-hilight .hilight.java
      screen-update
      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 "^ [a-zA-Z].*\(.*\){"
      !while $status
      beginning-of-line
      4 forward-char
      set-mark
      end-of-line
      exchange-point-and-mark
      copy-region
      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 "^ [a-zA-Z].*\(.*\){"
      !done
      goto-alpha-mark "p"
      !emacro

      define-macro find-java-function
      ; set-variable $debug 1
      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

      buffer-bind-key "list-java-functions" "f7"
    • Show all 5 messages in this topic