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

2323Re: Client-Server Problems with find-file, goto-line

Expand Messages
  • Dr. Detlef Groth
    Jun 20, 2008
    • 0 Attachment
      Hi.

      sorry, but I found the solution myself. Of course I have to use just
      the server-find-file command from below instead of find-file:

      The Tcl-command is:
      exec $me -m "C:ME:server-find-file $path" &

      regards,
      Detlef
      --- In jasspa@yahoogroups.com, "Dr. Detlef Groth" <dgroth@...> wrote:
      >
      > Hi all,
      >
      > I finally found the time to interact with the ME-Server from an
      > Tcl-Tree showing my project files see:
      > http://www.dgroth.de/downloads/me-no-ide.png
      >
      > What disturbs me is that me opens a popup-window for the running
      > me-server. If I have just one window I would rather see after clicking
      > in the tree just again one window. This is especially true for the
      > second feature goto-line where I would like to jum to a certain method
      > of a class definition for example.
      >
      > I tried to comment out popup-window invokations inside meserver.emf
      > but this does not work. Any idea ?
      >
      > regards,
      > Detlef
      >
      >
      > --- In jasspa@yahoogroups.com, Steven Phillips <bill@> wrote:
      > >
      > > Detlef,
      > >
      > > I've worked out the best way to do this, you need 2 macros - the
      first
      > > is the one directly called by the client/server interface, this
      stores
      > > the information. The second is the one that actually does the
      work, it
      > > is executed via the callback mechanism from the first macro so it
      will
      > > not run until ME is idle and is reasonably safe to do so. Below
      are the
      > > 2 macros, however I did hit a problem with the meserver.emf macro
      code,
      > > below is a fix, 2 lines need to be removed.
      > >
      > > Steve
      > >
      > > 0 define-macro server-find-file-callback
      > > find-file .server-find-file.f
      > > delete-other-windows
      > > !if &gre .server-find-file.l 0
      > > !force goto-line .server-find-file.l
      > > !endif
      > > screen-update
      > > !emacro
      > >
      > > define-macro server-find-file
      > > !force set-variable .f @1
      > > !if $status
      > > !force set-variable .l @2
      > > !if ¬ $status
      > > set-variable .l 0
      > > !endif
      > > 1 create-callback server-find-file-callback
      > > !endif
      > > !emacro
      > >
      > > *** meserver.emf 4 Oct 2006 20:07:08 -0000 2.10
      > > --- meserver.emf 9 Apr 2008 20:53:03 -0000
      > > ***************
      > > *** 30,40 ****
      > > !force 0 find-buffer #l4
      > > !endif
      > > !force execute-line #l3
      > > - !if ¬ &seq $buffer-bname #l4
      > > set-variable #l4 $buffer-bname
      > > popup-window #l1
      > > set-variable &ind &spr ":%s-buffer" #l2 #l4
      > > - !endif
      > > !elif &seq @wc "M"
      > > set-variable #l2 &lget &rig @wl 1 1
      > > set-variable #l3 &rig @wl &add 3 &len #l2
      > > --- 30,38 ----
      > >
      > >
      > > Detlef Groth wrote:
      > > >
      > > > Hi Steven,
      > > >
      > > > I think the only thing I really would like to do is opening a
      file or
      > > > reusing an existing buffer and optional going to a certain line
      > number
      > > > if line number is not null. As can be seen in the example macro.
      The
      > > > reason for this, that is that I want to implement a tree control in
      > > > Tcl/Tk which keeps track of my files and Tcl-classes and Tcl-Procs.
      > > > Klicking on file should visit the appropiate buffer, clicking on a
      > > > class-method or a file should open the file and jump to the
      > appropiate
      > > > line. Similar to a Tcl-proc. See the sample.gif
      > > >
      > > > Such feature which are common to eclipse and komodo for
      instance. Our
      > > > me- toolbar is quite handy but with many projects and files it
      > becomes
      > > > to difficult to use.
      > > >
      > > > regards,
      > > > Detlef
      > > >
      > > > -------- Original-Nachricht --------
      > > > > Datum: Wed, 09 Apr 2008 13:44:40 +0100
      > > > > Von: Steven Phillips <bill@ <mailto:bill%40jasspa.com>>
      > > > > An: jasspa@yahoogroups.com <mailto:jasspa%40yahoogroups.com>
      > > > > Betreff: Re: [jasspa] Client-Server Problems with find-file,
      > goto-line
      > > >
      > > > > The server interface has deliberately been restricted to avoid
      > the user
      > > > > accidentally breaking things (consider doing a large macro based
      > > > > operation to modify the current buffer when the server interface
      > > > changes
      > > > > the current buffer half way through - the confusion this will
      > create is
      > > > > going to hurt). But if you are convinced that this really is
      > what you
      > > > > want (and you give up your right to sue when you corrupt your
      files
      > > > :-))
      > > > > then I'll look into how to do this...
      > > > >
      > > > > Dr. Detlef Groth wrote:
      > > > > >
      > > > > > Hello all,
      > > > > >
      > > > > > I would like to run a pipeline like:
      > > > > >
      > > > > > $ /c/Programme/jasspa/me32.exe -m 'C:ME:find-file c:/path/to/
      > > > > > Makefile'
      > > > > > $ /c/Programme/jasspa/me32.exe -m 'C:ME:goto-line 18'
      > > > > >
      > > > > > unfortunatly does not work. Sometimes the *server* window popups
      > > > > > instead of the desired file argument and the file even if it
      > popups
      > > > > > does not have a focus
      > > > > >
      > > > > > cmds like
      > > > > > $ /c/Programme/jasspa/me32.exe -m 'C:ME:delete-other-windows'
      > > > > >
      > > > > > are simply ignored.
      > > > > >
      > > > > > A macro like:
      > > > > >
      > > > > > define-macro find-file-line
      > > > > > find-file @1
      > > > > > !if ¬ &equal 0 @2
      > > > > > goto-line @2
      > > > > > !endif
      > > > > > !emacro
      > > > > >
      > > > > > works if tested inside emacs but the invoked file-window does
      > not get
      > > > > > the focus if invoked from the commandline.
      > > > > >
      > > > > > Keeping short. I would like to invoke me with two arguments
      > the file-
      > > > > > name and a line number. The server should show at the end
      just one
      > > > > > window with the right file at the right line.
      > > > > >
      > > > > > any suggestions ?
      > > > > >
      > > > > > regards,
      > > > > > Detlef
      > > > > >
      > > > > >
      > > > >
      > > > >
      > > > > ------------------------------------
      > > > >
      > > > > __________________________________________________________
      > > > >
      > > > > This is an unmoderated list, but new members are moderated to
      > ensure
      > > > that
      > > > > there are no spam users. JASSPA is not responsible for the
      > content of
      > > > > any material posted to this list.
      > > > >
      > > > > To un-subscribe, send a mail message to
      > > > >
      > > > > mailto:jasspa-unsubscribe@yahoogroups.com
      > > > <mailto:jasspa-unsubscribe%40yahoogroups.com>
      > > > >
      > > > > or visit http://groups.yahoo.com/group/jasspa
      > > > <http://groups.yahoo.com/group/jasspa> and
      > > > > modify your account settings manually.
      > > > >
      > > > >
      > > > > Yahoo! Groups Links
      > > > >
      > > > >
      > > > >
      > > > --
      > > > Dr.Detlef Groth
      > > > Neue Scheune 5
      > > > 14548 Ferch
      > > > Germany
      > > >
      > > >
      > > >
      > ------------------------------------------------------------------------
      > > >
      > >
      >
    • Show all 10 messages in this topic