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

Re: [jasspa] Re: java-class/function-tree

Expand Messages
  • Detlef Groth
    ^[ t]*[a-zA-Z0-9_ ]* ([a-zA-Z0-9_ ,]* ){ | Wclass !!! ----------a space ! -------- two s sounds like a programmers poem. Thanks all, the trick
    Message 1 of 5 , Dec 15, 2000
    • 0 Attachment
      "^[ \t]*[a-zA-Z0-9_ ]*\([a-zA-Z0-9_ ,]*\){\\|\\Wclass " !!!
      '----------a space ! '-------- two \\s
      sounds like a programmers poem.
      Thanks all, the trick was simply `\\|',
      it is `|' in perl and it's competitors
      it is `\|' in the microemacs-commandline,
      it is `\\|' in the microemacs-macro.

      I got the followong tree :
      public class Start2 extends java.applet.Applet implements Runnable Line:2
      public void init(){ Line:39
      public void start(){ Line:77
      public void stop(){ Line:84
      public void run(){ Line:89
      while(true){ Line:110 // waiting for input not a function ..
      public void paint(Graphics g){ Line:144
      public void update(Graphics g){ Line:188
      public void drawSlogans(){ Line:191
      public boolean mouseDown(Event evt, int x, int y){ Line:208
      void show(String text){ Line:235
      class Flag extends java.applet.Applet Line:240
      Flag(int x, int y, Image flagImage){ Line:245
      void drawFlag(Graphics g){ Line:250
      boolean isClicked(int x_evt, int y_evt){ Line:255
      class Button extends java.applet.Applet Line:261
      Button(int x, int y, int modus){ Line:266
      void drawButton(Graphics g){ Line:271
      boolean isClicked(int x_evt, int y_evt){ Line:286

      what is almost that what I want. Of course this depends much on your coding style
      regarding the {}-brackets. Up to now I missed the javatags.emf. Did I miss a new
      release ?

      Follows the `final' release....

      define-macro list-java-functions
      ; set-variable $debug 1
      set-variable .buffer $buffer-bname
      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-java-function"
      set-variable $buffer-hilight .hilight.java
      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
      ; declare what to find
      set-variable .searchstring "^[ \t]*[a-zA-Z0-9_ ]*\([a-zA-Z0-9_
      ,]*\){\\|\\Wclass "
      !force search-forward .searchstring
      !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-java-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

      buffer-bind-key "list-java-functions" "f7"

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