* jde/lisp/jde-db.el (jde-debug): With a negative prefix, prompt for the
  main class name, like `jde-run' does.
---
 jde/lisp/jde-db.el |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/jde/lisp/jde-db.el b/jde/lisp/jde-db.el
index 4dc4a0c..5d7c822 100644
--- a/jde/lisp/jde-db.el
+++ b/jde/lisp/jde-db.el
@@ -6,6 +6,7 @@
 ;; Keywords: java, tools
 
 ;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2005 Paul Kinnucan.
+;; Copyright (C) 2009 Ludovic Courtès
 
 ;; 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
@@ -1572,15 +1573,17 @@ returns an eieio object of type `jde-db-debugger'."
 ;; with the generalized commands.
 
 ;;;###autoload            
-(defun jde-debug ()
+(defun jde-debug (&optional prefix)
   "Run the debugger specified by `jde-debugger' on the Java application
 whose source resides in the current buffer. This command determines
 the main class of the application either from the variable
 `jde-run-application-class' or from the source in the current
 buffer. If `jde-run-application-class' does not specify a class, the
 main class is assumed to be the class defined by the current source
-buffer. This command creates a command buffer for the debug session."
-  (interactive)
+buffer. This command creates a command buffer for the debug session.
+
+With a negative prefix, prompts for the main class name."
+  (interactive "p")
 
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   ;; This is a temporary hack until I 
@@ -1590,7 +1593,10 @@ buffer. This command creates a command buffer for the 
debug session."
   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     (let* ((debugger (jde-db-get-the-debugger))
            (application-main-class
-            (let ((main-class jde-run-application-class))
+            (let ((main-class (if (and (integerp prefix) (< prefix 0))
+                                 (jde-read-class-name
+                                  jde-run-application-class)
+                                 jde-run-application-class)))
               (if (or
                    (not main-class)
                    (string= main-class ""))
-- 
1.6.1.3



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
jdee-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jdee-users

Reply via email to