>From: Aaron Brashears <[EMAIL PROTECTED]>
>To: Paul Kinnucan <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: JDE-menu + is-app-or-applet
>Date: Tue, 15 Aug 2000 10:09:13 -0700
>
>Paul Kinnucan wrote:
> > Note, I am planning on adding a jde-compile-and-runcommand and possibly
> > modifying the jde-run command to check whether the class file is out of
> > date and if so, ask whether you want to recompile before running the
> > current app.
> >
> > Any feedback on these proposals would be welcome.
> >
> > - Paul
>
>I think the jde-compile-and-run command sounds great. I spent a confused
>minute wondering why a program wasn't working correctly recently when
>all I had to do was recompile. The jde-run command has a problem because
>it won't do dependency checking even if you have dependency turned on,
>but it would still be useful.


Aaron,

I built my own small (and not too fancy) compile-and-run function. If you 
like it, use it, until Paul comes out with the real stuff. (Which probably 
won't be long now. He seems quite busy, right?)

Put this in your .emacs:


(defun compile-and-run* ()
  "If buffer is modified compile and run, else just run the code."
  (interactive)
  (if (buffer-modified-p)
      (jde-compile)                     ;then
    (jde-run))                          ;else
  )

;; To be used as a hook at the end of a java compilation
(defun end-of-java-compile (bufname msg)
"To be used as a hook at the end of a java compilation"
  (if (not (eq (string-match "finished" msg) nil))
      (progn
        (other-window 1 t)
        (other-window 1 t)              ;Switch back to java buffer.
        (jde-run))))

;; Set function to be called at end of java compilation
(setq compilation-finish-function 'end-of-java-compile)




Regards,
Daniel
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Reply via email to