Problem setting breakpoint with JDEbug

2003-01-02 Thread Tetzlaff, Ralf
Hi,
I am new to XEmacs AND to JDE so be indulgent if I am making ridiculous
things.
I have a problem setting a breakpoint with JDEbug. I started the debugger,
launched a process and then tried to set a breakpoint. But nothing happens
except an Error Warning: Symbol`s function definition is void:
line-beginning-position.
Can anyone help me with this? I used the JDE-Help-Submit problem report
function and posted the result below.

Thanks,
Ralf


Platform: Windows 2000, service pack 2 installed
Emacs  : XEmacs 21.4 (patch 10) Military Intelligence (Windows) [Lucid]
(i586-pc-win32) of Fri Nov 08 2002 on TSUNAMI
Package: JDE version 2.3.2
Required packages: semantic-1.4.1 eieio-0.17 speedbar-0.14beta4


current state:
==
(setq
 jde-which-method-class-min-length 4
 jde-gen-to-string-method-template '((end-of-line) ' \/**\ ''n
 \* Retrieve a String representation
of this object\ ''n \* \ ''n
 \* @return a codeString/code
representation of this object.\ ''n
 \* @see Object#toString()\ ''n
\*/\ ''n (jde-gen-method-signature
   \public\   \String\ 
\toString\   nil  ) ' (if jde-gen-kr 
  ()  'n) \{\''n ''r'n
\}\''n')
 jde-bug-jre-home 
 jde-bug-debugger-host-address TETZLAFF_LAP
 jde-import-insert-group-names nil
 jde-help-docsets '((JDK API  nil))
 jde-complete-signature-display-time 5
 jde-gen-junit-test-class-buffer-template '((funcall
jde-gen-boilerplate-function) (jde-gen-get-package-statement)
\import
junit.framework.Test;\ ''n
\import
junit.framework.TestCase;\ ''n
\import
junit.framework.TestSuite;\ ''n 'n
(progn (require 'jde-javadoc)
(jde-javadoc-insert-start-block)) \ * \
\ Unit Test for class \
(jde-gen-junit-class
(file-name-nondirectory buffer-file-name)) ''n
\ \
(jde-javadoc-insert-empty-line) \ \ (jde-javadoc-insert-empty-line)
\ * Created: \
(current-time-string) ''n
\ \
(jde-javadoc-insert-empty-line)
\ \ (jde-javadoc-insert
'tempo-template-jde-javadoc-author-tag)
\ \ (jde-javadoc-insert
'tempo-template-jde-javadoc-version-tag)
\ \ (jde-javadoc-insert
'tempo-template-jde-javadoc-end-block \*/\)
\public class \
(file-name-sans-extension
(file-name-nondirectory buffer-file-name))
\ extends TestCase \  (if
jde-gen-kr  () ''n) \{\''n 'n
 \ /** \ ''n  \* Creates
a new code\
(file-name-sans-extension
(file-name-nondirectory buffer-file-name))
\/code instance.\ ''n 
\*\ ''n  \* @param name test name\ ''n
 \*/\''n \public \
(file-name-sans-extension
(file-name-nondirectory buffer-file-name))
\ (String name)\ (if
jde-gen-kr  () ''n) \{\''n
\super(name);\''n \}\'
''n 'n \/**\ ''n
\* @return a
codeTestSuite/code\ ''n \*/\ ''n
\public static TestSuite
suite()\ ' (if jde-gen-kr  () ''n)
\{\''n \TestSuite suite =
new TestSuite ();\ ''n ''n
\return suite;\ ''n
\}\''n'n \/** \ ''n
\* Entry point \ ''n \*/
\ ''n
\public static void
main(String[] args) \ (if jde-gen-kr  () ''n)
\{\''n
\junit.textui.TestRunner.run(suite());\''n \}\''n
\}\ \// \
(file-name-sans-extension
(file-name-nondirectory buffer-file-name)) ''n)
 jde-run-option-heap-profile '(nil ./java.hprof 5 20 Allocation objects)
 jde-compile-option-encoding 
 jde-compile-option-optimize nil
 jde-project-hooks nil
 jde-run-executable-args nil
 jde-compile-option-verbose nil
 jde-gen-buffer-templates '((Class . jde-gen-class) (Interface .
jde-gen-interface) (Console . jde-gen-console)
(Swing App . jde-gen-jfc-app) (Unit Test .
jde-gen-junit-test-class))
 jde-wiz-get-set-methods-include '(Both)
 

RE: (emacs newbie) Modifying JDE

2003-01-02 Thread Daniel Hegyi
For buffer switching, I recommend this:

http://asfys3.fi.uib.no/~boukanov/emacs/


Daniel





From: Inger, Matthew [EMAIL PROTECTED]
To: 'Heath Holcomb' [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: (emacs newbie) Modifying JDE
Date: Tue, 31 Dec 2002 16:47:59 -0500

OK.  Simpler:

(custom-set-variables
 '(bs-cycle-configuration-name all)
)

(global-set-key [C-tab] 'bs-cycle-next)
(global-set-key [S-tab] 'bs-cycle-previous)

I'm not sure how to add your own configuration, but i'm sure it
can easily be done


-Original Message-
From: Heath Holcomb [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 31, 2002 3:33 PM
To: [EMAIL PROTECTED]
Subject: Re: (emacs newbie) Modifying JDE


Alternately, put this line in your .emacs

(global-set-key '[C-tab] 'bs-cycle-next)

Works on GNU Emacs 21 and possibly on other versions with the bs
package. It may not do exactly the same thing as the code below, but
it's sure a heck of a lot simpler.

Inger, Matthew wrote:
 Put this in your .emacs file.  It will cycle
 through the buffers as you hit Control Tab.
 You may notice, rather than traverse forward
 in the buffer list when i get the next buffer,
 I traverse backwords.  The reason is that when you
 are on buffer X and move to buffer Y, it puts buffer
 X next in the buffer list after Y, so what happens is
 that you would just swap between the two:

 ie:
 (buffer-list) returns (X Y Z A B C)
 switch to Y while on X
 (buffer-list) reutrns (Y X Z A B C)

 See the problem, the next switch will go to X.

 If we go backwards:
 (buffer-list) returns (X Y Z A B C)
 switch to C while on X
 (buffer-list) reutrns (C X Y Z A B)

 So, the next call would go to buffer B, then A,
 and so forth, eliminating the problem.  You can
 change this code to avoid other buffers other than
 the Minibuf ones (say *scratch*) by adding or
 closes to the if in the get-next-buffer function.

(if (or (string-match ... )
  (string-match ... )
(string-match ... ))
   (get-next-buffer cbuf)
   cbuf)


 Here's the code:

 (defun get-next-buffer(cbuf)
   (let*
   ((bufs (buffer-list))
(bufslen (length bufs))
(pos (position cbuf bufs)))

 (if (eq pos 0)
 (setq pos (- bufslen 1))
 (setq pos (- pos 1)))

 (setq cbuf (nth pos bufs))

 (if (string-match .*Minibuf.* (buffer-name cbuf))
 (get-next-buffer cbuf)
   cbuf))
   )

 (defun next-buffer()
   Switch to the next buffer in the list
   (interactive)
   (let*
   ((cbuf (current-buffer)))

 (setq cbuf (get-next-buffer cbuf))
 (switch-to-buffer cbuf)
 )
   )

 (global-set-key [C-tab] 'next-buffer)





 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 31, 2002 1:09 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: (emacs newbie) Modifying JDE


 Hello all,

 (Sorry if this is the wrong place to send this)

 I'm at a new job where we absolutely have no budget for software, and
 have to try and use free everything. For a Java IDE, we first tried
 NetBeans, which has many problems, and since I've looked at Forte,
 Eclipse, and JBuilder Personal Edition, none of which I love. I've been
 messing around with Unix here and there for years, and so in the back of
 my mind I've long thought that customizing emacs is naturally the way to
 go. Rather than live with a 100 Meg + IDE that doesn't do what you want,
 why not take emacs and *build* what you want?

 I've used emacs for the last 3 days on a Java project (in plain ol' Java
 mode), and while there are some things I like, in general the experience
 has been akin to commuting every day in an old car with no power
 steering and blown shocks. There's nothing wrong with it, but at the end
 of the week you're just ragged out. Now, I also know not to blame emacs
 for this -- it would seem that there are no bad emacs experiences --
 just bad modes! Or rather, modes that aren't quite to one's liking. If
 I'm not mistaken there's likely to be nothing I want to do in emacs that
 can't be customized. Trouble is I don't know how.

 In particular, there are a number of things I'd like to be able to do
 that I can do in TextPad, my shareware editor of choice. Here are things
 I really miss . . .

 - Ctrl-Tab to move among open buffers, just like Alt-Tab moves across
 applications. Ctrl-X B Enter is clunkier, and not quite the same.
 - Shift-Arrow (or Page Up/Down or other navigation keys I'm overlooking
 -- ah yes, Home/End) to select, along with Ctrl-Arrow which moves across
 words, and Del to delete selected text. Ctrl-space, Alt-arrow, Ctrl-W
 gets you there but too clunky (see no power steering above).
 - Tab indents a selected region, Shift-Tab unindents. Very handy.
 - A window that lists open buffers, and lets you click on the one you
 wish to edit
 - Less heavy-handedness in specifying tabbing. In particular, I don't
 ever want to hit Tab *and have nothing happen*. (grrr.)
 - Ctrl-/ comments a region, 

Re: Problem setting breakpoint with JDEbug

2003-01-02 Thread Andrew Hyatt

Very odd.  This should work.  To double check, perhaps you can execute
these lines:

(if (not (fboundp 'line-beginning-position))
(defsubst jde-line-beginning-position (optional N)
  (save-excursion (beginning-of-line N) (point)))
  (defalias 'jde-line-beginning-position 'line-beginning-position))

(if (not (fboundp 'line-end-position))
(defsubst jde-line-end-position (optional N)
  (save-excursion (end-of-line N) (point)))
  (defalias 'jde-line-end-position 'line-end-position))

Execute them by marking them as a region (using ctrl-space at the
beginning and then moving to the end of the region) and then doing M-x
eval-region.  Does it still happen after you do that?

These lines are from jde-db.el, and should insure that
line-beginning-position is defined no matter what your system is.
Perhaps you do not have these lines, or for some reason they are not
executing.  

To be safe, you really should have a .emacs file.  See the JDE manual
on how to configure it to use JDE.  It may help in this instance,
although right now I can't think of a reason why.


Tetzlaff, Ralf [EMAIL PROTECTED] writes:

 Hi,
 I am new to XEmacs AND to JDE so be indulgent if I am making ridiculous
 things.
 I have a problem setting a breakpoint with JDEbug. I started the debugger,
 launched a process and then tried to set a breakpoint. But nothing happens
 except an Error Warning: Symbol`s function definition is void:
 line-beginning-position.
 Can anyone help me with this? I used the JDE-Help-Submit problem report
 function and posted the result below.
 
 Thanks,
 Ralf