Re: RFE?: Suppress abbrv mode in comments
Actually jde-gen's default "cflow" templates are comment/quote aware. That is, the tempo-templates include a hook that expands the abbrev with a control flow template everywhere except when point is inside of a comment or a double quoted string. The problem is that the tempo-templates are activated by abbrev-mode, which is not case sensitive and which doesn't make the text that triggered the abbrev expansion available to the expander of that text. There's also no mecahnism through which a template can say "oh wait, cancel the expansion and leave the text unmolested." So, abbrev-mode expands abbrevs without regard to case, and the jde cflow templates are forced to choose one case or the other to use in contexts (quotes and strings) when the full expansion is not appropriate. In sum, this is a minor annoyance, but I'm sure you'll agree that it's much better than getting if () { } inserted when you're trying to compose a comment (which is what earlier versions of the templates did before I added the quote-or-string hook). Eric In message <[EMAIL PROTECTED]>, [EMAIL PROTECTED] writes: : : Hi, : : Is it possible to suppress abbreviation mode for comments? For example, if : I want to start a sentence in my comment with the word "If", abbreviation : mode always kicks in and changes it to lowercase "if", thinking that I am : entering a java keyword. I can of course Type "If" C-q SPC every time, but : considering that most often in a comment I one is not typing code, but : comments, it would be nice if abbreviation was disabled for this. I suppose : if you wanted to be really fancy abbreviation mode could ignore everything : except text inside blocks. : : Ian : : . :
Re: Sorting methods
[EMAIL PROTECTED] wrote: >> Subject: Sorting methods >> From: "Perkens-Golomb, Burkhard" <[EMAIL PROTECTED]> >> Date: 01 Oct 2001 12:57:34 +0200 >> To: [EMAIL PROTECTED] >> >> >>I'm looking for a tool to arrange methods in Java sources >>alphabetically. The pretty printer that comes with JRefactory has very good control over the sorting of different source elements. I believe it has an option for alphabetical sorting. http://jrefactory.sourceforge.net/ (BTW - if anyone knows a little lisp function that would let me run the current buffer through this pretty printer, I'd appreciate it). Cheers, Len.
Re: Debugging with jdb (newbie)
> I have set up jdb as my debugger and source directories for > debugger to '/dziela/java'. Appending slash to the path name helped. J.K.
Re: Project File->Save saves to .emacs file?
Brian Krisler wrote: > Is this correct? I would prefer it to save to the project file. > Everytime I customize something, it writes all JDE configs to > my .emacs file and corrupts it pretty badly. Quote from the JDE Users guide: "If you want the setting to apply to all projects that do not have a project file (see Using Project Files), you should save the variable in your .emacs file. To save the variable in your .emacs file, select Save for Future Sessions from the State menu for the variable in the customization buffer. If you want the setting to apply only to a particular project, you should save the setting in the .prj file for that project. To do this, open a source file from that project, select Set for Current Session from the State menu for the variable, select the source buffer, and select JDE->Project->Project Files->Save (C-c C-v C-p) from the Emacs menubar. " Get the full users guide here. http://jde.sunsite.dk/jdedoc/html/jde-ug/jde-ug.html Mark
Project File->Save saves to .emacs file?
Is this correct? I would prefer it to save to the project file. Everytime I customize something, it writes all JDE configs to my .emacs file and corrupts it pretty badly. XEmacs 21.1 JDE 2.2.8 bk
RFE?: Suppress abbrv mode in comments
Hi, Is it possible to suppress abbreviation mode for comments? For example, if I want to start a sentence in my comment with the word "If", abbreviation mode always kicks in and changes it to lowercase "if", thinking that I am entering a java keyword. I can of course Type "If" C-q SPC every time, but considering that most often in a comment I one is not typing code, but comments, it would be nice if abbreviation was disabled for this. I suppose if you wanted to be really fancy abbreviation mode could ignore everything except text inside blocks. Ian .
RE: JDEBug not stopping at breakpoints with 2.2.9beta2
> This may be a bug in the compile server. I'll check it out. This is really odd, because it works for me. I just tested using the compile server in a simple class and running JDEBug, and it works. Javier
RE: JDEBug not stopping at breakpoints with 2.2.9beta2
Molitor, Stephen writes: > OK -- That makes sense. I tried a few things. When I compile via the > compile server (jde-compiler is set to "javac server"), it doesn't work. > JDEBug doesn't stop on a breakpoint. However, when I compile via javac > executable (jde-compiler is set to "javac"), or when I compile from the > command line via '-g', it works -- JDEBug stops on breakpoints. So it seems > that the compiler server is not turning on the debug option, although > according the toe CompileServer output, it is: > > CompileServer output: > d:/home/steve/Foo.java -classpath d:/home/steve -g -deprecation > > > > Compilation finished at Tue Oct 02 14:01:52 > > I did set the jde-jdk and jde-jdk-registry variables to point to my JDK. > Any other ideas? This may be a bug in the compile server. I'll check it out. Thanks, Paul
RE: JDEBug not stopping at breakpoints with 2.2.9beta2
OK -- That makes sense. I tried a few things. When I compile via the compile server (jde-compiler is set to "javac server"), it doesn't work. JDEBug doesn't stop on a breakpoint. However, when I compile via javac executable (jde-compiler is set to "javac"), or when I compile from the command line via '-g', it works -- JDEBug stops on breakpoints. So it seems that the compiler server is not turning on the debug option, although according the toe CompileServer output, it is: CompileServer output: d:/home/steve/Foo.java -classpath d:/home/steve -g -deprecation Compilation finished at Tue Oct 02 14:01:52 I did set the jde-jdk and jde-jdk-registry variables to point to my JDK. Any other ideas? Thanks. Steve Molitor [EMAIL PROTECTED] -Original Message- From: Paul Kinnucan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 1:21 PM To: Molitor, Stephen Cc: '[EMAIL PROTECTED]' Subject: JDEBug not stopping at breakpoints with 2.2.9beta2 Molitor, Stephen writes: > Has anyone had any luck with JDEBug in 2.2.9beta2? I can't get it to stop > at a breakpoint. I tried it with 2.2.9beta2, at I just tried it again with > the latest versions of the .el files from CVS (12:00 pm, October 2, 2001, > CST). I'm using JDK 1.3, Windows NT 4.0, Emacs 20.7.1, eieio 0.16, semantic > 1.4beta11, elib 1.0. > > Here's the output, followed by the contents of the JDEBug buffer. Thanks. > > Steve Molitor > [EMAIL PROTECTED] > > Steve, JDEbug works fine for me in JDE 2.2.9beta2. I don'think the problem you are having has anything to do with the recent changes in JDEbug. JDEbug is requesting the that target vm set the breakpoints that you have specified. However, the vm is not honoring the requests for some reason. This can happen, for example, if the vm never loads the class in which the breakpoint occurs or if the class does not contain the necessary debug info (e.g., it was compiled with jikes). - Paul > *** Debugger Output for Process Foo(1) *** > > Launch command line: > javaw -classpath d:/home/steve Foo > > Emacs connected to standard IO port 4720 for process Foo. > Launched VM Java Debug Interface (Reference Implementation) version 1.3 > Java Debug Wire Protocol (Reference Implementation) version 1.0 > JVM Debug Interface version 1.0 > JVM version 1.3.0 (Java HotSpot(TM) Client VM, interpreted mode) > initSIOConnect: starting standard I/O handshake. > initSIOConnect: starting SIO connect thread. > Debugger waiting for Emacs to connect to app SIO port 4720. > vm started... > All threads suspended... > Setting breakpoint at line 6 in Foo.java. > Debugger connected to standard I/O socket. > Setting breakpoint at line 3 in Foo.java. > Running Foo. > Foo process ended. > Closed transport for application's standard output. > Closed transport for application's standard error output. > vm disconnected... > > > <<< JDEBug Buffer Contents: > cd d:/home/steve/ > javaw -classpath > d:/home/steve/lisp/thirdparty/jde/java/lib/jde.jar;c:/jdk1.3/lib/tools.jar > jde.debugger.Main > > > (jde-dbo-init-debug-session) > > JDE> -1 1 launch 1 -vmexec javaw -classpath d:/home/steve Foo > > > (jde-dbo-message > 1 "Launched VM Java Debug Interface (Reference Implementation) version 1.3 > Java Debug Wire Protocol (Reference Implementation) version 1.0 > JVM Debug Interface version 1.0 > JVM version 1.3.0 (Java HotSpot(TM) Client VM, interpreted mode)") > > > (jde-dbo-message 1 "initSIOConnect: starting standard I/O handshake.") > > > (jde-dbo-message 1 "initSIOConnect: starting SIO connect thread.") > > > (jde-dbo-command-result 1 4720) > > > (jde-dbo-message > 1 "Debugger waiting for Emacs to connect to app SIO port 4720.") > > > (jde-dbo-event-set > 1 "all" > (list "Thread" 1 "main" "unknown" "suspended by debugger" > (list) > "VM has no information" > "VM has no information") > (list 'jde-dbo-vm-start-event)) > > JDE> 1 2 break absolute Foo.java 6 > > > (jde-dbo-message 1 "Debugger connected to standard I/O socket.") > > > (jde-dbo-command-result 2 0) > > JDE> 1 3 break absolute Foo.java 3 > > > (jde-dbo-command-result 3 1) > > JDE> 1 4 run > > > (jde-dbo-command-result 4) > > > (jde-dbo-event-set 1 "none" nil > (list 'jde-dbo-vm-death-event)) > > > (jde-dbo-message 1 "Closed transport for application's standard output.") > > > (jde-dbo-message 1 "Closed transport for application's standard error > output.") > > > (jde-dbo-event-set 1 "none" nil > (list 'jde-dbo-vm-disconnected-event)) >
JDEBug not stopping at breakpoints with 2.2.9beta2
Molitor, Stephen writes: > Has anyone had any luck with JDEBug in 2.2.9beta2? I can't get it to stop > at a breakpoint. I tried it with 2.2.9beta2, at I just tried it again with > the latest versions of the .el files from CVS (12:00 pm, October 2, 2001, > CST). I'm using JDK 1.3, Windows NT 4.0, Emacs 20.7.1, eieio 0.16, semantic > 1.4beta11, elib 1.0. > > Here's the output, followed by the contents of the JDEBug buffer. Thanks. > > Steve Molitor > [EMAIL PROTECTED] > > Steve, JDEbug works fine for me in JDE 2.2.9beta2. I don'think the problem you are having has anything to do with the recent changes in JDEbug. JDEbug is requesting the that target vm set the breakpoints that you have specified. However, the vm is not honoring the requests for some reason. This can happen, for example, if the vm never loads the class in which the breakpoint occurs or if the class does not contain the necessary debug info (e.g., it was compiled with jikes). - Paul > *** Debugger Output for Process Foo(1) *** > > Launch command line: > javaw -classpath d:/home/steve Foo > > Emacs connected to standard IO port 4720 for process Foo. > Launched VM Java Debug Interface (Reference Implementation) version 1.3 > Java Debug Wire Protocol (Reference Implementation) version 1.0 > JVM Debug Interface version 1.0 > JVM version 1.3.0 (Java HotSpot(TM) Client VM, interpreted mode) > initSIOConnect: starting standard I/O handshake. > initSIOConnect: starting SIO connect thread. > Debugger waiting for Emacs to connect to app SIO port 4720. > vm started... > All threads suspended... > Setting breakpoint at line 6 in Foo.java. > Debugger connected to standard I/O socket. > Setting breakpoint at line 3 in Foo.java. > Running Foo. > Foo process ended. > Closed transport for application's standard output. > Closed transport for application's standard error output. > vm disconnected... > > > <<< JDEBug Buffer Contents: > cd d:/home/steve/ > javaw -classpath > d:/home/steve/lisp/thirdparty/jde/java/lib/jde.jar;c:/jdk1.3/lib/tools.jar > jde.debugger.Main > > > (jde-dbo-init-debug-session) > > JDE> -1 1 launch 1 -vmexec javaw -classpath d:/home/steve Foo > > > (jde-dbo-message > 1 "Launched VM Java Debug Interface (Reference Implementation) version 1.3 > Java Debug Wire Protocol (Reference Implementation) version 1.0 > JVM Debug Interface version 1.0 > JVM version 1.3.0 (Java HotSpot(TM) Client VM, interpreted mode)") > > > (jde-dbo-message 1 "initSIOConnect: starting standard I/O handshake.") > > > (jde-dbo-message 1 "initSIOConnect: starting SIO connect thread.") > > > (jde-dbo-command-result 1 4720) > > > (jde-dbo-message > 1 "Debugger waiting for Emacs to connect to app SIO port 4720.") > > > (jde-dbo-event-set > 1 "all" > (list "Thread" 1 "main" "unknown" "suspended by debugger" > (list) > "VM has no information" > "VM has no information") > (list 'jde-dbo-vm-start-event)) > > JDE> 1 2 break absolute Foo.java 6 > > > (jde-dbo-message 1 "Debugger connected to standard I/O socket.") > > > (jde-dbo-command-result 2 0) > > JDE> 1 3 break absolute Foo.java 3 > > > (jde-dbo-command-result 3 1) > > JDE> 1 4 run > > > (jde-dbo-command-result 4) > > > (jde-dbo-event-set 1 "none" nil > (list 'jde-dbo-vm-death-event)) > > > (jde-dbo-message 1 "Closed transport for application's standard output.") > > > (jde-dbo-message 1 "Closed transport for application's standard error > output.") > > > (jde-dbo-event-set 1 "none" nil > (list 'jde-dbo-vm-disconnected-event)) >
Re: Quote Jde Compile Option Directory variable?
Olle Sundblad wrote: > Hi > > Maybe this should go to the delvelopers list? > > I just noticed that when I set "Jde Compile Option Directory" to: > > c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes > or > "c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes" > > I get the following error (because of the spaces allowed in/required by > Windows): > > output: > cd c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/src/ > javac -classpath "c:/Program Files/Apache Tomcat > 4.0/common/lib/servlet.jar;c:/Program Files/Apache Tomcat > 4.0/common/lib/tools.jar" -d c:/Program Files/Apache Tomcat > 4.0/webapps/cid/WEB-INF/classes -g -target 1.2 TestApp.java > javac: invalid argument: Files/Apache > Usage: javac > > I can get it to compile when by setting "Jde Compile Option Directory" to: > > \"c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes\" > > output: > cd c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/src/ > javac -classpath "c:/Program Files/Apache Tomcat > 4.0/common/lib/servlet.jar;c:/Program Files/Apache Tomcat > 4.0/common/lib/tools.jar" -d /"c:/Program Files/Apache Tomcat > 4.0/webapps/cid/WEB-INF/classes/" -g -target 1.2 TestApp.java > > Compilation finished at Tue Oct 02 17:13:00 > > But it doesn't look very nice (with the slash before the quote etc.), so my > question is shouldn't the "Jde Compile Option Directory" be quoted by jdee > instead? I solved that this way (see below) but maybe there is a better way? > > in jde-compile.el I changed > > (if (not (string= jde-compile-option-directory "")) > (setq options > (concat options > " -d " > (jde-normalize-path 'jde-compile-option-directory > > to > > (if (not (string= jde-compile-option-directory "")) > (setq options > (concat options > " -d \"" > (jde-normalize-path 'jde-compile-option-directory) "\""))) > > I have only tested this in Windows but I can't see why it wouldn't work > under unix/linux as well. > > /Olle It would probably be preferable to toggle jde-quote-classpath variable in the project file. M-x customize-variable jde-quote-classpath Mark
JDEBug not stopping at breakpoints with 2.2.9beta2
Has anyone had any luck with JDEBug in 2.2.9beta2? I can't get it to stop at a breakpoint. I tried it with 2.2.9beta2, at I just tried it again with the latest versions of the .el files from CVS (12:00 pm, October 2, 2001, CST). I'm using JDK 1.3, Windows NT 4.0, Emacs 20.7.1, eieio 0.16, semantic 1.4beta11, elib 1.0. Here's the output, followed by the contents of the JDEBug buffer. Thanks. Steve Molitor [EMAIL PROTECTED] *** Debugger Output for Process Foo(1) *** Launch command line: javaw -classpath d:/home/steve Foo Emacs connected to standard IO port 4720 for process Foo. Launched VM Java Debug Interface (Reference Implementation) version 1.3 Java Debug Wire Protocol (Reference Implementation) version 1.0 JVM Debug Interface version 1.0 JVM version 1.3.0 (Java HotSpot(TM) Client VM, interpreted mode) initSIOConnect: starting standard I/O handshake. initSIOConnect: starting SIO connect thread. Debugger waiting for Emacs to connect to app SIO port 4720. vm started... All threads suspended... Setting breakpoint at line 6 in Foo.java. Debugger connected to standard I/O socket. Setting breakpoint at line 3 in Foo.java. Running Foo. Foo process ended. Closed transport for application's standard output. Closed transport for application's standard error output. vm disconnected... <<< JDEBug Buffer Contents: cd d:/home/steve/ javaw -classpath d:/home/steve/lisp/thirdparty/jde/java/lib/jde.jar;c:/jdk1.3/lib/tools.jar jde.debugger.Main (jde-dbo-init-debug-session) JDE> -1 1 launch 1 -vmexec javaw -classpath d:/home/steve Foo (jde-dbo-message 1 "Launched VM Java Debug Interface (Reference Implementation) version 1.3 Java Debug Wire Protocol (Reference Implementation) version 1.0 JVM Debug Interface version 1.0 JVM version 1.3.0 (Java HotSpot(TM) Client VM, interpreted mode)") (jde-dbo-message 1 "initSIOConnect: starting standard I/O handshake.") (jde-dbo-message 1 "initSIOConnect: starting SIO connect thread.") (jde-dbo-command-result 1 4720) (jde-dbo-message 1 "Debugger waiting for Emacs to connect to app SIO port 4720.") (jde-dbo-event-set 1 "all" (list "Thread" 1 "main" "unknown" "suspended by debugger" (list) "VM has no information" "VM has no information") (list 'jde-dbo-vm-start-event)) JDE> 1 2 break absolute Foo.java 6 (jde-dbo-message 1 "Debugger connected to standard I/O socket.") (jde-dbo-command-result 2 0) JDE> 1 3 break absolute Foo.java 3 (jde-dbo-command-result 3 1) JDE> 1 4 run (jde-dbo-command-result 4) (jde-dbo-event-set 1 "none" nil (list 'jde-dbo-vm-death-event)) (jde-dbo-message 1 "Closed transport for application's standard output.") (jde-dbo-message 1 "Closed transport for application's standard error output.") (jde-dbo-event-set 1 "none" nil (list 'jde-dbo-vm-disconnected-event))
Quote Jde Compile Option Directory variable?
Hi Maybe this should go to the delvelopers list? I just noticed that when I set "Jde Compile Option Directory" to: c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes or "c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes" I get the following error (because of the spaces allowed in/required by Windows): output: cd c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/src/ javac -classpath "c:/Program Files/Apache Tomcat 4.0/common/lib/servlet.jar;c:/Program Files/Apache Tomcat 4.0/common/lib/tools.jar" -d c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes -g -target 1.2 TestApp.java javac: invalid argument: Files/Apache Usage: javac I can get it to compile when by setting "Jde Compile Option Directory" to: \"c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes\" output: cd c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/src/ javac -classpath "c:/Program Files/Apache Tomcat 4.0/common/lib/servlet.jar;c:/Program Files/Apache Tomcat 4.0/common/lib/tools.jar" -d /"c:/Program Files/Apache Tomcat 4.0/webapps/cid/WEB-INF/classes/" -g -target 1.2 TestApp.java Compilation finished at Tue Oct 02 17:13:00 But it doesn't look very nice (with the slash before the quote etc.), so my question is shouldn't the "Jde Compile Option Directory" be quoted by jdee instead? I solved that this way (see below) but maybe there is a better way? in jde-compile.el I changed (if (not (string= jde-compile-option-directory "")) (setq options (concat options " -d " (jde-normalize-path 'jde-compile-option-directory to (if (not (string= jde-compile-option-directory "")) (setq options (concat options " -d \"" (jde-normalize-path 'jde-compile-option-directory) "\""))) I have only tested this in Windows but I can't see why it wouldn't work under unix/linux as well. /Olle
RE: Sorting methods
A quick search on the web gives http://www.mmsindia.com/JPretty.html claiming to reorder stuff. Never tried it though. -Original Message- From: Eric D. Friedman [mailto:[EMAIL PROTECTED]] Sent: 01 October 2001 18:46 To: Perkens-Golomb, Burkhard Cc: [EMAIL PROTECTED] Subject: Re: Sorting methods It should be pretty easy to do this with JavaCC. Just use one of the Java grammars that are included with JavaCC and write the parse tree back out in whatever order you need. This will make it possible to preserve javadoc too. You didn't mention where Visual Age puts field declarations, but JavaCC should be able to help there too. You might also want to search the comp.compilers.tools.javacc newsgroup to see if anyone has already done something similar --> it seems like the sort of "code beautifying" tool that a compulsive neat freak must have been inspired to write at some point. You could also look at ANTLR for the same stuff: it's a different parser generator, and its adherents may have done something that would be helpful to you. Eric In message <[EMAIL PROTECTED]>, "Perkens-Golomb, Burkhard" writes: : I'm looking for a tool to arrange methods in Java sources : alphabetically. : : I've given away sources to a customer. They've worked with them in : Visual Age and I want to look at their changes. They don't remember : all changes they've made so I have to do a diff. But Visual Age stores : the sources in a database, not in flat files, and if you want normal : Java files from Visual Age you get them terrible formatted and the : methods are arranged alphabetically. A diff with my sources is futile. : : I'm looking for a tool to arrange the methods in my sources : alphabetically. Of course I could load my sources in Visual Age and : get them back terrible formatted, too :-) . But I don't have Visual : Age and I don't want to use it if it's possible without it! : : Could Emacs do it (with semantic, senator etc.)? Or other tools? Any : ideas or hints? : : TIA, : : Burkhard : -- If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. --