Re: Decompiler elisp connector
On Thu, 7 Jun 2001 08:23, you wrote: - I have no publicly available host that I can dump source code for people to download from. if you need one for this sort of thing in future drop me a line and I might be able to provide a temporary hosting of something. cheers dim This is a elisp package that will detect that Emacs has opened a class file, run the class data through a decompiler, and then replace the class data in the buffer with a Java source representation. The package can optionally create an editable buffer, constructing a .java based name from the original .class based name, that is easily saved to disk. To use, place decompile.el somewhere on your elisp path. Place (require 'decompile) in your .emacs file. The package is intended to be used with Jad, but if you have another decompiler that obeys various assumptions built into decompile.el, then you should be able to use it by changing the executable name and command line option customisation variables. With a fair degree of chutzpah, I have parented the customisation group under the main JDE group. The source is originally based on a package that was written by Ingo Koch, but I have modified it somewhat. Note that the comments identify Ingo as the maintainer. I'm not sure how accurate this is given that while the structure is much the same, I have almost completely rewritten everything. It is not as complete as I would like. Things that I would like to do, or see done (hint hint), are: - The package assumes the byte comes from a .class file on disk and therefore the .java buffer name can be constructed from this. The byte code should be decompiled, and the .java buffer name constructed by parsing the source for the class declaration. - The package demands that the decompiler output source code to standard out. This should be made more flexible. - There is a flag that, if set, means that the source code is placed in a buffer that is modifable, associated with a Java filename, and marked as modified. The buffer isn't saved, so the Java file isn't written to. The flag should be extended to include a third option to automatically save the reconstructed Java source. Some thought is needed, about what to do if the intended Java file already exists. - I wish the programming style was less imperative, and more functional, by it's been a while, and my Lisp skills are rusty. - I've seen another package that links with jar and zip files to automatically view Java source representations of the contained files. When I have time, I'll steal the idea and put it here. -+--- Craig McGeachie | #include cheesy_tag.h +61 (410) 774902 | while (!inebriated) c2h5oh = (++bottle)-contents; -+--- The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any another MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance. File information --- File: decompile.el.gz Date: 7 Jun 2001, 7:49 Size: 2516 bytes. Type: Unknown Content-Type: Application/Octet-stream; charset=us-ascii; name=decompile.el.gz Content-Transfer-Encoding: BASE64 Content-Description:
newbie question agin
I am trying to follow the JDE user guide, I have found the section that says to turn on code completion, alter the flag in JDE-Project-Options-General and set for current session : Jde Enable Abbrev Mode: [Hide] [Toggle] on (non-nil) [State]: you have set this option, but not saved it for future sessions. Enable expansion of abbreviations in jde-mode. [More] however when I then try code completion with extspace, nothing happens. Please could anyone explain what I have done wrong. Cheers Neil
jdb -attach 8000
Hello, Can I force jdb in jde to attach on a running process and not to run vm it selfe by default with myClass? I want that if I give in the vm-option attach 8000 it should start jdb: jdb -attach 8000 but it does: jdb myClass -attach 8000 cu haluk
JDE and Checkstyle
Hi, checkstyle (see http://www.geocities.com/oburn/checkstyle/) is a 'development tool to help programmers write Java code that adheres to a coding standard. Its purpose is to automate the process of checking Java code, and to spare humans of this boring (but important) task.' Maybe some of you are interested in the attached 'jde-check.el', which interfaces jde to checkstyle. Best, Markus Mohnen -- Dr. Markus Mohnen [EMAIL PROTECTED] Lehrstuhl f. Informatik II www-i2.informatik.rwth-aachen.de/~mohnen/ RWTH Aachen, Ahornstr. 55 Tel.: (+49/0) 241 80 21240 52056 Aachen, GERMANY Fax.: (+49/0) 241 217 ;;; JDE-CHECK.EL --- Checkstyle interface for JDE ;; Copyright (C) 2001 Markus Mohnen ;; Author: Markus Mohnen [EMAIL PROTECTED] ;; Maintainer: Markus Mohnen [EMAIL PROTECTED] ;; Created: 06 Jun 2001 ;; Version: 1.0 ;; Keywords: ;; This program 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 1, or (at your option) ;; any later version. ;; This program 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. ;; A copy of the GNU General Public License can be obtained from this ;; program's author (send electronic mail to ;; [EMAIL PROTECTED]) or from the Free Software ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;; LCD Archive Entry: ;; jde-check|Markus Mohnen|[EMAIL PROTECTED] ;; |Checkstyle interface for JDE ;; |$Date$|$Revision$|~/packages/jde-check.el ;;; Commentary: ;;; This package provides an interface from JDE (see ;;; http://jde.sunsite.dk/) to checkstyle (see ;;; http://www.geocities.com/oburn/checkstyle/) an `development tool ;;; to help programmers write Java code that adheres to a coding ;;; standard'. ;;; Installation: ;; ;; Put this file on your Emacs-Lisp load path and add following into your ;; ~/.emacs startup file ;; ;; (require 'jde-check) ;;; Usage: ;; ;; M-x `jde-check' to check the java file in the current buffer. ;; ;;; Customization: ;; ;; M-x `jde-check-customize' to customize all the jpack options. ;;; Code: (require 'jde-compile) (require 'jde-run) (defconst jde-check-version 1.0) (defgroup jde-check nil JDE Checker Options :group 'jde :prefix jde-check-option-) (defcustom jde-checker-class com.puppycrawl.tools.checkstyle.Main *Java checker class. Specifies the class of the the program to be used to check the source in the current buffer. The default is the checkstyle program. :group 'jde-check :type 'string) (defcustom jde-checker-classpath nil *Specify paths of classes required to run the jde-checker application. The JDE uses the specified paths to construct a -classpath argument to pass to the Java interpreter. This option overrides the `jde-global-classpath' option. :group 'jde-check :type '(repeat (file :tag Path))) (defcustom jde-read-check-args nil *Specify whether to prompt for additional checker arguments. If this variable is non-nil, the jde-check command prompts you to enter additional checker arguments in the minibuffer. These arguments are appended to those specified by customization variables. The JDE maintains a history list of arguments entered in the minibuffer. :group 'jde-check :type 'boolean) (defvar jde-interactive-check-args String of checker arguments entered in the minibuffer.) (defvar jde-interactive-compile-arg-history nil History of checker arguments entered in the minibuffer.) (defcustom jde-check-option-command-line-args *Specify options as a string of command-line arguments. The value of this variable should be a string of switches understood by the checker. This variable is intended to be used to set check options not otherwise defined by the JDE, in particular, options not defined by checkstyle but used by another checker that you might want to use with the JDE. :group 'jde-check :type 'string) (defcustom jde-check-option-allow-tabs nil *Indicates whether to allow tabs. :group 'jde-check :type 'boolean) (defcustom jde-check-option-allow-protected nil *Indicates whether to allow protected data. :group 'jde-check :type 'boolean) (defcustom jde-check-option-allow-noauthor nil *Indicates whether to allow no @author tag to be defined for class and interface Javadoc comments. :group 'jde-check :type 'boolean) (defcustom jde-check-option-allow-maxlinelen 80 *Specifies the maximum line length. :group 'jde-check :type 'integer) (defcustom jde-check-option-pattern-member *Specifies the regular expression to match against member variables. If empty, use checkstyle defaults. :group 'jde-check :type 'string) (defcustom jde-check-option-pattern-parameter *Specifies the regular expression to match against
Error with compile-auto-highlight in latest JDE; maybe related to font-lock changes?!
I have always set compile-auto-highlight to t means Emacs should auto. highlight all error-messages after finishing compilation. This works fine in all major-modes except for jde-mode. This means if i open a java-source in normal java-mode and not in jde-mode the errors will be auto. highlighted. After enabling jde-mode for this source and compiling again, the errors will first highlighted after doing anything, e.g. clicking into the buffer. Compiling means not jde-compile but any general task which uses the compile.el package, e.g. also a grep. If i remember right, this behavior is relative new, means i think previous JDE version don´t have this bug; maybe this is realted to the font-lock changes in latest versions...but this is only a shot in the blue :-) Klaus -- Klaus Berndlmailto: [EMAIL PROTECTED] sdm AG http://www.sdm.de software design management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
Re: Decompiler elisp connector
I plan to post this on the JDE's Contributed Software page. Interested JDE users can download it from there. - Paul At 08:23 AM 6/7/2001 +1000, Craig McGeachie wrote: Here it is, on the off chance that anyone else may want to play with it. I have attached the file directly, rather than providing a download link, because: - it's smaller than some of the messages that appear on this list - I have no publicly available host that I can dump source code for people to download from. This is a elisp package that will detect that Emacs has opened a class file, run the class data through a decompiler, and then replace the class data in the buffer with a Java source representation. The package can optionally create an editable buffer, constructing a .java based name from the original .class based name, that is easily saved to disk. To use, place decompile.el somewhere on your elisp path. Place (require 'decompile) in your .emacs file. The package is intended to be used with Jad, but if you have another decompiler that obeys various assumptions built into decompile.el, then you should be able to use it by changing the executable name and command line option customisation variables. With a fair degree of chutzpah, I have parented the customisation group under the main JDE group. The source is originally based on a package that was written by Ingo Koch, but I have modified it somewhat. Note that the comments identify Ingo as the maintainer. I'm not sure how accurate this is given that while the structure is much the same, I have almost completely rewritten everything. It is not as complete as I would like. Things that I would like to do, or see done (hint hint), are: - The package assumes the byte comes from a .class file on disk and therefore the .java buffer name can be constructed from this. The byte code should be decompiled, and the .java buffer name constructed by parsing the source for the class declaration. - The package demands that the decompiler output source code to standard out. This should be made more flexible. - There is a flag that, if set, means that the source code is placed in a buffer that is modifable, associated with a Java filename, and marked as modified. The buffer isn't saved, so the Java file isn't written to. The flag should be extended to include a third option to automatically save the reconstructed Java source. Some thought is needed, about what to do if the intended Java file already exists. - I wish the programming style was less imperative, and more functional, by it's been a while, and my Lisp skills are rusty. - I've seen another package that links with jar and zip files to automatically view Java source representations of the contained files. When I have time, I'll steal the idea and put it here. -+--- Craig McGeachie | #include cheesy_tag.h +61 (410) 774902 | while (!inebriated) c2h5oh = (++bottle)-contents; -+--- The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any another MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance. File information --- File: decompile.el.gz Date: 7 Jun 2001, 7:49 Size: 2516 bytes. Type: Unknown
Cannot open load file: executable
Is anyone familiar this error?I get it when I try to start XEmacs 2.1 (patch 14) on Solaris 2.6 with JDE. Included are the versions of the packages I have installed, the backtrace, and the message log. Any help would be greatly appreciated. Thanks, -ryan Installed: semantic-1.4beta5 eieio-0.16 elib-1.0 speedbar-0.13a jde-2.2.7.1 Backtrace: Signaling: (file-error Cannot open load file executable) load-internal(executable nil t nil nil nil) load(executable nil t nil) require(executable) load-internal(jde nil t nil nil nil) load(jde nil t nil) require(jde) load-internal(~/.emacs t t t nil nil) load(~/.emacs t t t) load-user-init-file() load-init-file() command-line() normal-top-level() Message Log: Loading cus-face... Loading cus-face...done Loading customization dependencies... Loading customization dependencies...done Bootstrapping objects... Bootstrapping objects...done Loading regexp-opt... Loading regexp-opt...done Loading cl-macs... Loading cl-macs...done jde-java-font-lock: building names cache... jde-java-font-lock: building names cache...empty Loading debug... Loading debug...done Entering debugger...
Re: Cannot open load file: executable
At 12:31 PM 6/7/2001 -0400, revans wrote: Is anyone familiar this error?I get it when I try to start XEmacs 2.1 (patch 14) on Solaris 2.6 with JDE. Included are the versions of the packages I have installed, the backtrace, and the message log. Any help would be greatly appreciated. Thanks, -ryan executable.el is in xemacs-packages/lisp/sh-script - Paul
Re: Does JDEbug work with JKD 1.3.1?
At 01:15 PM 6/7/2001 -0400, you wrote: I tried to use JDEbug with JDK 1.3.1, Win NT, GNU Emacs 20.7.1, and had no luck. The message in the minibuffer was: Cannot find JPDA jar file at e:/jdk131/lib/jpda.jar So far as I can tell, there is no jpda.jar file to be found in JDK 1.3.1. The JDEbug setup instructions in the user's guide all refer to JDK 1.3; should these instructions work with 1.3.1? Yes, and you are not following them otherwise you would not get this message. - Paul
RE: Problem with mouse key
This is a bug in semantic. I attached the file semantic-java.el with the fix of David Ponce for this bug. Javier -Original Message- From: Arafat Mohamed [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 07, 2001 2:14 PM To: [EMAIL PROTECTED] Subject: Problem with mouse key Whenever I try to use the mouse to access the menubar (or use the keyboard [F10]) I get the following error, Signaling: (invalid-function (macro . #[nil À [(skip-chars-forward )] 1 (c:/home/lisp/semantic14b5/semantic-java.elc . 18126)])) jde-javadoc-skip-spaces-forward() jde-javadoc-nonterminal-at-line() jde-javadoc-enable-menu-p() Any idea what this is? Only seems to happen in JDE. Attached is a copy of my .emacs Thanks, Arafat semantic-java.el
Speedbar snafu:dynamic-tags-function-list
I thought I was about to give up and ring you guys but instead I'll post this in case anyone else runs into it (it may already have been posted but the archives don't go back that far). NTEmacs 20.7 has an old speedbar.el in the lisp directory that will override your site-lisp load-path giving the load error - void variable:dynamic-tags-function-list. Apparently that's the only needed variable that does not exist in that old file. Just delete the old one, point back to your site-lisp package and go (easy to say after chasing it for a day).
New constructor template
Hi, I'd like to have the constructor of each class have the line super(); I tried amending the Jde Gen Console Buffer Template variable by inserting the line super(); I set changes for current session and tried it. It had no effect. How should I do this? Thanks, Daniel _ Get your FREE download of MSN Explorer at http://explorer.msn.com
New for loop template...
Here is a new template I'm using which seems generally useful. It builds a for loop with an iterator and it bound to foriter: for (Iterator var = coll.iterator(); variter.hasNext();) { var.next(); } // end of for (Iterator iter = dups.iterator(); iter.hasNext();) The template prompts for var and coll. I hope you find it useful enough to include in jde. If you'd prefer the submission in another format (such as a compile jde-gen.el file, I'm happy to do that. (defcustom jde-gen-cflow-for-iter '( (if (jde-parse-comment-or-quoted-p) '(l \foriter\) '(l ' \for (Iterator \ (p \variable: \ var) \ = \ (p \collection: \ coll) \.iterator(); \ (s var) \.hasNext();\ \)\ (if jde-gen-kr () ''n) \{\''n''r'n (s var) \.next();\ ''n' \} // end of for (Iterator \ (s var) \ = \ (s coll) \.iterator(); \ (s var) \.hasNext();)\''n') ) ) Skeleton for iterator statement. To insert the statement at point, type foriter and then space. Note that abbrev mode must be enabled. See `jde-enable-abbrev-mode' for more information. :group 'jde-gen :type '(repeat string) :set '(lambda (sym val) (tempo-define-template jde-for-iter (jde-gen-read-template val) foriter Insert a Java for iterator statement 'jde-tempo-tags) (set-default sym val))) (defun jde-gen-load-cflow-abbrevs () Defines jde-mode abbrevs for the control flow templates. (define-abbrev local-abbrev-table if 'tempo-template-jde-if 0) (define-abbrev local-abbrev-table else 'tempo-template-jde-else 0) (define-abbrev local-abbrev-table ife 'tempo-template-jde-if-else 0) (define-abbrev local-abbrev-table while 'tempo-template-jde-while 0) (define-abbrev local-abbrev-table for 'tempo-template-jde-for 0) (define-abbrev local-abbrev-table fori 'tempo-template-jde-for-i 0) (define-abbrev local-abbrev-table foriter 'tempo-template-jde-for-iter 0) (define-abbrev local-abbrev-table switch 'tempo-template-jde-switch 0) (define-abbrev local-abbrev-table case 'tempo-template-jde-case 0) (define-abbrev local-abbrev-table try 'tempo-template-jde-try-catch 0) (define-abbrev local-abbrev-table catch 'tempo-template-jde-catch 0) (define-abbrev local-abbrev-table tryf 'tempo-template-jde-try-finally 0) (define-abbrev local-abbrev-table finally 'tempo-template-jde-finally 0) (define-abbrev local-abbrev-table main 'tempo-template-jde-main 0)) Cheers, -- Robert
Re: New for loop template...
Is there a generic way for users to add new templates to jde-mode without editing jdel lisp files? i.e. some way to use customize to create a new template, add it to the abbrev table for jde-mode and save this customiozation in your .emacs file? If this can't be done, is there a way for me to customize the abbrev table for jde-mode manually within my .emacs file? If there is no way to do it with customize, that might be a worthy feature to add. Thanks, Matt On 06/07/2001 05:59:50 PM Robert Mecklenburg wrote: Here is a new template I'm using which seems generally useful. It builds a for loop with an iterator and it bound to foriter:
Re: JDE Bug
Paul Kinnucan wrote: At 10:33 PM 6/6/2001 -0700, Ben Wing wrote: Paul Kinnucan wrote: At 08:37 AM 6/6/2001 -0600, Brad Porter wrote: Hello. I am finding that I have to modify 'jde-compile.el' in order to get the JDK -d option to work correctly under cygwin. I set directory-path-sep to ?/ in my .emacs file for the rare times I use XEmacs (for testing JDE compatibility).This eliminates the need for quoting. Note that the default separator under NT/Emacs is forward slash. is this change required for jde to work in xemacs? Presently yes, but not in the next release. i certainly hope not. Why? a package that requires a non-standard setting of an application is not a well-behaved package. i'm glad you've fixed jde to work with either directory-path-sep, and hopefully we can work together to get the new version in xemacs. I systematically use forward slashes as the path separator on Windows and I have never experienced the slightest problem in doing so. On the other hand, I regularly get email from new users who think they have to use backslashes in paths on Windows and who are unaware that back slash is the Emacs string escape character. This result is that they innocently put things like (setq jde-compile-option-directory c:\foo\bar) in their .emacs file and are puzzled by the result (c:foobar). I applaud your determination to make XEmacs a native Windows application. However, I think in this case you are mistaken on two counts. First, forward slash is a legitimate Windows path separator so making it the default sep character in no way violates your goal. On the other hand,. making back slash the default sep character conflicts with the established Emacs meaning of backslash, which is escape the next character. This creates endless headaches for new users and for people who have to support them. - Paul -- ben I'm sometimes slow in getting around to reading my mail, so if you want to reach me faster, call 520-661-6661. See http://www.666.com/ben/chronic-pain/ for the hell I've been through.
JDE Bug speed question
Hi, I find that JDE bug can take like 10 seconds or so when I step-over sometimes (quite often). Does anyone else find this ? :)