-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi, folks!
I developed with the jdee two years ago and i am very happy about this great
software.
Often i missed a code snippet like jde-ant that should run a junit test on the
current buffer. Therefore i tried to make this snippet and this is the
result: jde-junit.el.
Most parts was copied from jde-sources because i am a java developer but no
elisp hacker (hacker in positive mind).
Next task for me is to write a jde package that supports us to write jsp files
with code completion like IntelliJ Idea (another great ide, but to expensive
for me). Any hints are welcome.
Regards, Torsten.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAa8iQcfUEwKb+U+YRAnhMAKC7epqqV+efSF2U/ptAQ/a7B0EaSQCgzBLg
kodGDKLjlj4cVnGTOf2TX/U=
=328+
-----END PGP SIGNATURE-----
;; jde-junit.el --- runs the junit test in the current buffer.
;; $Revision: 1.1.1.1 $
;; Author: Torsten Geise <[EMAIL PROTECTED]>
;; Maintainer: Torsten Geise
;; Keywords: tools, processes
;; Copyright (C) 2004 Torsten Geise
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; This package is developed to perform junit test cases from within the
;; current buffer. Most defuns are copied from jde sources and modified to
;; do the right things to JUnit.
;; This package should be best integrated to the JDEE. That means this
;; package uses the jde project files to store junit specific settings and
;; so on.
;; Please send any comments, bugs, or upgrade requests to
;; Torsten Geise at [EMAIL PROTECTED]
(require 'jde)
(defgroup jde-junit nil
"JDE JUnit"
:group 'jde
:prefix "jde-junit-")
(defcustom jde-junit-working-directory ""
"*Path of the working directory for the test run.
If you specify a path, the JDE launches the test run from the
directory specified by the path. Otherwise the test run will be launched
from the current buffers directory"
:group 'jde-junit
:type 'file)
(defcustom jde-junit-testrunner-type "junit.textui.TestRunner"
"Defines the testrunner to be used."
:group 'jde-junit
:tag "TestRunner"
:type '(string))
(defun jde-junit-run
"Starts junit testrunner with buffer corresponding class name."
(interactive
(if (equal major-mode 'jde-mode)
(let (
(vm (jde-run-get-vm))
(working-directory (if (string= jde-junit-working-directory
"")
default-directory
(jde-normalize-path
'jde-junit-working-directory))))
(oset vm :main-class jde-junit-testrunner-type )
(jde-run-set-app-args (concat (jde-db-get-package)
(file-name-sans-extension
(file-name-nondirectory (buffer-file-name)))))
(cd working-directory)
(jde-run-vm-launch vm))
(error "The jde-junit-run command works only in a Java source buffer."))))
;;;###autoload
(defun jde-junit-show-options ()
"Show the JDE JUnit Options panel."
(interactive)
(customize-apropos "jde-junit" 'groups))
;; Register and initialize the customization variables defined
;; by this package.
(jde-update-autoloaded-symbols)
(provide 'jde-junit)