Re: Can't compile after lisp sources compiled (JDE 2.3.2)
On Sun, 9 Feb 2003, Paul Kinnucan wrote: > Jim Wilson writes: [...] > > > The JDE for emacs looked like it was worth trying. I installed and it > > mostly works, except > > > > Doing a compile of a Java source file (JDE->Compile, or C-c C-v C-c) > > works fine until I attempt to compile the lisp sources for JDE. > > > > The compile of the lisp sources (M-x jde-compile-jde) yields various > > "reference to free variable" messages and a final > > "The function `extent-list' is not known to be defined." > > This has nothing to do with your problem. extent-list is defined > only in XEmacs. The JDEE has lots of code that refers to XEmacs-only > symbols. The Emacs compiler doesn't know about them so it complains. In the ECB CVS repository http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ecb/ecb/ you can find a package-independent library silentcomp.el which handles all these differences between the Emacs-flavors well and silences the byte-compiler. It is stolen and slightly changed from cc-mode. silentcomp.el is small (about 80 lines of code) and makes byte-compiling much less annoying and confusing for Emacs-Newbies. silentcomp.el contains an introducing comment at beginning to explain how to use it, incl. an example. Ciao, Klaus -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
ECB 1.91.1 released!
ECB 1.91.1 is released! === Reminder: The homepage of ECB has moved to http://ecb.sourceforge.net. The old homepage at http://home.swipnet.se/mayhem/ecb.html is not longer supported. How to get it: -- Sorry, it's too big to post the sources here... If you are using ECB >= 1.80 then you can just call "M-x ecb-download-ecb" if you are online. ECB will then download latest ECB (1.91.1) and install it for you. Or go to the homepage at http://ecb.sourceforge.net and download it from there. What's new: --- This is mostly a bugfix release which fixes some annoying bugs. Here are the entries of the HISTORY file: * Fixed a bug in the navigation-history of ECB which sometimes has prevented that a user can open files from the sources/history buffer or clicking onto tokens in the method-buffer. Now the back-forward-navigation works stable. * Fixes a bug in the speedbar integration which prevented clicking onto a directory in the speedbar: Always after clicking onto a directory speedbar has re-synced itself to the directory of the current source-buffer in the edit-window. This bug is fixed, now directory navigation in the speedbar works. * Fixes a bug in upgrading stored window-sizes from ECB 1.80 to ECB >= 1.90. Fixes also two bugs in `ecb-store-window-sizes' if default-values are used in `ecb-layout-window-sizes' or if ecb-windows have frame-height as height (resp. frame-width as width). * Fixed a bug in the downloading feature of ECB. * Enhanced the "downloading new packages" feature of ECB: Now ECB autom. checks at the download sites which versions are available. With the new option `ecb-download-package-version-type' you can define which types of version you allow to download (only stable, stable and betas or stable, betas and alphas); see related section in the online-manual! * New command `ecb-download-semantic' for easy getting latest semantic versions. Here are some of the new features of ECB beginning with version 1.90: * Fixed an annoying bug which results in an error "Wrong type argument: integer-or-marker-p nil)" after a full buffer reparse. ECB 1.80 has repaired its internal state but nevertheless the user had to reclick on the same token after this error to really jump to a token. With ECB 1.90 this bug has been gone. * Now ECB displays at every start a "Tip of the day" in a dialog-box. This can be switched off with option `ecb-tip-of-the-day'. * New feature: Now the methods buffer is auto. expanded if the node related to the current token in the edit-window is not visible (probably because its parent is collapsed). * New command `ecb-expand-methods-nodes' which allows precisely expanding tokens with a certain indentation-level. * Rewritten the mechanism for storing customized window-sizes. See option ecb-layout-window-sizes and the command ecb-store-window-sizes and ecb-restore-window-sizes. Now the sizes are always saved as fractions of the width (resp. height) of the ECB-frame, so the stored sizes are always correct regardless of the current frame-size. * Rewritten cache-mechanism for directories and sources: This results in a speed-boost for big-size directories. * Added a complete new section "The layout-engine of ECB" to the online-help which describes in detail how to program new layouts and new special windows. * Fixed some bugs concerning the eshell-integration. * Speedbar is now integrated in ECB and can be used instead of the standard ECB-directories buffer. * Naming and managing of layouts has been changed! Now a layout is not longer identified by an integer but by an arbitrary string! Example: The layout with index 0 in ECB <= 1.80 is now named "left1" in ECB 1.90. Therefore the name of the option 'ecb-layout-nr' has changed to 'ecb-layout-name'! See the docstring of 'ecb-layout-name' for the names of all buildin layouts. ECB autom. upgrades the old-option to the new one! * A lot of new hooks * Adding a new layout type "left-right" which allows the ECB-tree-windows to be located at the left and the right side of the ECB-frame. * Now ECB can be "autoloaded". * Now ECB offers a command `ecb-create-new-layout' for interactively creating new layouts "by example". Enjoy, Klaus -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
Re: Introspection based Java class browser....also demonstrates alittle bit of java and lisp integration...
taticvoid checkIO() > private static native void setIn0(InputStream) > private static native void setOut0(PrintStream) > private static native void setErr0(PrintStream) > public static void setSecurityManager(SecurityManager) > private static synchronized void setSecurityManager0(SecurityManager) > public static native long currentTimeMillis() > private static native Properties initProperties(Properties) > public static Properties getProperties() > public static void setProperties(Properties) > public static String getenv(String) > public static void gc() > public static void runFinalization() > private staticInputStream nullInputStream() throws > NullPointerException > private staticPrintStream nullPrintStream() throws > NullPointerException > /** > * Fields of class System > ******/ > public final static InputStream in > public final static PrintStream out > public final static PrintStream err > private staticSecurityManager security > private staticProperties props -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
Re: Introspection based Java class browser....also demonstrates alittle bit of java and lisp integration...
ent: Wednesday, February 19, 2003 7:32 AM > To: [EMAIL PROTECTED] Subject: Introspection based Java class browseralso > demonstrates alittle bit of java and lisp integration... > > > >To use : > > >1. unzip the attached zip at in the jde directory > >2. Just put the following in your .emacs > > >(require 'jde-introspect) > > >Now put the point anywhere in Java buffer where you would > >normally invoke jde-complete functions. Then type > >(control c) (control v) (/) to see the java typeinfo > >buffer. > > >For example: > > >With point in the 'System' below : > >public class Foo { > > public static void main(String[] args) { > > System.out.println(args.length); > > } > >} > >here is what you get in a temp buffer. All the java class names are > >hyperlinks (activated by > >mouse or key). > >class java.lang.System -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
Re: auto-delete compile buffer
On Wed, 19 Feb 2003, Diez B. Roggisch wrote: > Hi, > > Javier S. Lopez wrote: > > The method jde-compile-finish-kill-buffer takes care of removing the > > compilation window from the screen. > > if you add this lines: > > (run-at-time > > "3 sec" nil 'kill-buffer > > (get-buffer-create "*compilation*")) > > to your jde-compile-finish-kill-buffer method after the lines: > > (get-buffer-create "*compilation*) > > I created this function: > > > (defun jde-compile-finish-kill-buffer (buf msg) > "Removes the jde-compile window after a few seconds if no errors." > (save-excursion > (set-buffer buf) > (if (null (or (string-match ".*exited abnormally.*" msg) > (string-match ".*BUILD FAILED.*" (buffer-string > ;;no errors, make the compilation window go away in a few seconds > (progn > (run-at-time > "2 sec" nil 'delete-windows-on > (get-buffer-create "*compilation*") > (run-at-time > "2 sec" nil 'kill-buffer > (get-buffer-create "*compilation*"))) > (message "No compilation errors")) > ;;there were errors, so jump to the first error > (next-error I think it has to be: (defun jde-compile-finish-kill-buffer (buf msg) "Removes the jde-compile window after a few seconds if no errors." (save-excursion (set-buffer buf) (if (null (or (string-match ".*exited abnormally.*" msg) (string-match ".*BUILD FAILED.*" (buffer-string ;;no errors, make the compilation window go away in a few seconds (progn (run-at-time "2 sec" nil 'delete-windows-on (get-buffer-create "*compilation*")) (run-at-time "2 sec" nil 'kill-buffer (get-buffer-create "*compilation*")) (message "No compilation errors")) ;;there were errors, so jump to the first error (next-error Klaus > > However, its not working the way I wanted it to: it kills the buffer, > but now the frame split persits :( > > Any suggestions? > > Regards, > > Diez -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
Re: Syntax error indication oon the fly....the beginning...
command-hook 'compilation-unhighlight-source) | | (defun compilation-unhighlight-source-after-change (&rest args) | "Delete `compilation-source-overlay' after a buffer change. This hook is | only added to `after-change-functions' after `compilation-goto-locus' if the | cdr of `compilation-highlight-source' is 'after-change. This hook removes | itself from `after-change-functions'." | (when (overlay-buffer compilation-source-overlay) | (delete-overlay compilation-source-overlay) | (remove-hook 'after-change-functions | 'compilation-unhighlight-source-after-change t))) ` Enjoy it and maybe enhance your nifty command with this... Klaus On Sat, 22 Feb 2003, Sandip Chitale wrote: > Folks, > > I had brought up this issue earlier...I took a first crack at > it. > It is still rough but with some expert help this could be completed... > Especially I need help with save-excursion and buffer selection etc... > > For now - > > 1. Compile any java class such that it results in error messages > 2. Switch to the *compilation* buffer > 3. Invoke the following function animate-messages > > (defun animate-messages() >"Animate messages in *compilation* buffer." >(interactive) >(let* ( >(errorMarker (compilation-next-error-locus 1 t t)) >(compilation-error-overlay) >) > (while errorMarker >(let ( > (nextErrorMarker (compilation-next-error-locus 1 nil t)) > (errorBufferMarker (car errorMarker)) > errorString > errorBegin > errorEnd > ) > (save-excursion > (setq errorBegin (marker-position errorBufferMarker)) > (if nextErrorMarker > (setq errorEnd (marker-position (car nextErrorMarker))) > (setq errorEnd (point-max)) > ) > (setq errorString (buffer-substring errorBegin errorEnd)) > ) > (save-excursion > (if (not (eq (current-buffer) (marker-buffer (cdr errorMarker > (switch-to-buffer (marker-buffer (cdr errorMarker))) > ) > (goto-char (marker-position (cdr errorMarker))) > (if compilation-error-overlay > (move-overlay compilation-error-overlay (line-beginning-position) > (line-end-position)) > (setq compilation-error-overlay > (make-overlay (line-beginning-position) (line-end-position))) > ) > (overlay-put compilation-error-overlay 'face 'underline) > (message errorString) > (sit-for 3) > ) > (setq errorMarker (compilation-next-error-locus 1 nil t)) > ) >) > (if compilation-error-overlay > (delete-overlay compilation-error-overlay) > ) > (message "Done.") > ) >) > > [NOTE: The above works for grep output also.] > > 4. This should animate the error messages i.e. > > i. move the point to the location of error > ii. temporarily underline the line > iii. echo the error message in mini-buffer > > What I want to do eventually is to hook this function to compilation > finish hook. > When there are compilation error messages the error messages are shown > in the > buffer with some overlay. The help-echo text property is used to show > the error meesage > in mini-buffer. > > A background compilation may be invoked every so often or on demand > basis... > > enjoy, > sandip -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
WG: Reference version of JDK 1.3 for Solaris
> >I had the system people here at the Mathworks apply all outstanding patches > >to the Solaris OS running on my SPARC workstation. Now JDEbug works > >perfectly, albeit stepping is slow because the vm is running in interpreted > >mode (no need for "classic" switch). Here is my configuration: > > >Sun Microsystems Ultra 5-10 SPARC workstation > >SunOS 5.6 Generic_105181-20 > >JDK 1.3.0 (Reference Implementation) > >Emacs 20.3.1 > >JDE 2.2.6.2 > > >So the bottom line is this. If you're having trouble running JDEbug on Solaris: > > >1) Make sure you are using the REFERENCE version of JDK 1.2 or 1.3. > > >2) Make sure that you are running SunOS 5.6 with all the latest patches > >installed. > > I can´t find any REFERENCE version of JDK 1.3. Where can i get it and download it? > > Thanks, > Klaus > > -- > Klaus Berndl mailto: [EMAIL PROTECTED] > sd&m AG http://www.sdm.de > software design & management > Thomas-Dehler-Str. 27, 81737 München, Germany > Tel +49 89 63812-392, Fax -220 >
AW: Paragraph filling...
I recommend using filladapt.el (get it from http://wonderworks.com/) which does a much better job of filling than the standard one. After installing this package you can modify the variable 'filladapt-token-table' like follows (add these elements to the variable): ("@param[ \t]" bullet) ("@see[ \t]" bullet) ("@return[ \t]" bullet) ("@exception[ \t]" bullet) I´m sure you are able to add further javadoc-keywords if you need them :-) After that all your JAVADOC comments wil be filled correct. Hope this helps, Klaus > Hi! > > I'm not sure if this has been fixed in versions above jde-2.1.6beta23 > (which I still use, I simply have not got around updating yet ;). > > When typing M-q (i.e. running fill-paragraph) in a JavaDOC comment, > fill-paragraph does the "wrong" thing, i.e. > > /** > * A very long sentence which goes on and > on and on > and on and on and on and on and on and on over several lines. > * > * @param foo Some text describing foo > */ > > If point is placed at and I hit M-q, the result is > > /** > * A very long sentence which goes on and > * on and on and on and on and on and on and on and on over > * several lines. @param foo Some text describing foo > */ > > Which is at least not what I intended. ;) > > However this could very easily be fixed if JDE-mode redefined > paragraph-start and paragraph-separate to something like this > > (make-local-variable 'paragraph-start) > (setq paragraph-start "\([ > ]\|[ ]+\*[ ]*\)") > (make-local-variable 'paragraph-separate) > (setq paragraph-separate "\([ ]*\|[ ]+\*[ ]*\)$") > > > /John > > -- > LM/ERA/LVA/KD John Olsson mailto:[EMAIL PROTECTED] >Ericsson Radio Systems AB, Box 1248, S-581 12 Linkoping > - > Phone: +46 13 321070 ECN: 868 1070 Fax: +46 13 287370 > - > I was doing object-oriented assembly when I was 1 year old... > For some reason my mom insists on calling it "Playing with blocks" >
AW: Paragraph filling...
> I experience a different problem with (fill-paragraph): the > last line of a > multiline comment, usually " */", gets removed, whereby the " */" gets > appended to the previous line. Can I avoid this too, by using > filladapt? Don´t know if filladapt.el avoids this but i´m using filladapt.el 2.12, cc-mode 5.26 and jde 2.2.6 with Gnu Emacs 20.7 and all filling is correct means the "*/" stays on the last line and is not moved to the previous line!
AW: Paragraph filling...
First of all: I´m using filladapt 2.12 (patched one, see below), cc-mode 5.26 and jde 2.2.6 with Gnu Emacs 20.7. All my statements are related to this versions (but i think the Emacs version is not so important, all >= 20.3.1 should work) First of all you should install cc-mode >= 5.26 (with Emacs 5.25 is shipped i think!)!! (get it from http://cc-mode.sourceforge.net/index.php) OK, you should add the following to you c-mode-common-hook (e.g. within a lambda expression): ;; turn on adaptive auto-fill-mode for easy writing comments (auto-fill-mode 1) (c-setup-filladapt) (turn-on-filladapt-mode) In cc-mode >= 5.26 there is a special filladapt-handling included. On the cc-mode Website there is a patched filladapt.el mentioned (You should use this one) For this go to http://cc-mode.sourceforge.net/filladapt.php Then you should add the javadoc-keywords to filladapt like i have xplained in my previous posting. This would fill comments like /* * kldjfglkjdflgj sdklfjg lksjdfg jskdfjg ksjdfg jsldkfjg klsjdflg j * kldjfgjdfgkjsdlkfjgkl sjd * @param firstParam: klsdjgf jdflkgj skdlfjg kljsdflkg jklsdjfg kljsdlfkg j *kldjfklgjsd klfjg sldkfjg ksdjfg kljsdlfkg jksldjfg kjsdflg jdf *dfkkdfghlöf * @param secondParam: ... */ If you want a filling like you mentioned in your mail like /* * kldjfglkjdflgj sdklfjg lksjdfg jskdfjg ksjdfg jsldkfjg klsjdflg j * kldjfgjdfgkjsdlkfjgkl sjd * @param firstParam: klsdjgf jdflkgj skdlfjg kljsdflkg jklsdjfg kljsdlfkg j *kldjfklgjsd klfjg sldkfjg ksdjfg kljsdlfkg jksldjfg k *dfkkdfghlöf * @param secondParam: ... */ you must change the ("@param[ \t]" bullet) to ("@param[ \t][A-Za-z0-9_]+[ \t]" bullet) I have tested this and it works fine. But IMHO the former one is better because if you are using very long paramter-names you will waste a lot of space and your comments can be difficult to read. But it´s your choice :-) One hint: You should add the keywords to 'filladapt-token-table' via customize and there NOT at beginning of the already defined elements but at the end or even better somewhere in the middle! Do NOT use 'add-to-list'-function to add the keywords in your .emacs because this adds them at the beginning! This is confusing filladapt! Klaus > -Ursprüngliche Nachricht- > Von: Berche, Guillaume [mailto:[EMAIL PROTECTED]] > Gesendet am: Freitag, 19. Januar 2001 13:59 > An: '[EMAIL PROTECTED]' > Cc: '[EMAIL PROTECTED]' > Betreff: RE: Paragraph filling... > > Klaus, > > I tried filladapt (I added the keywords as you mentionned, > required it in my .emacs after byte compiling it, turned it > on) and when it is turned on I don't get the filling feature > on javadoc anymore, whereas it seems that when I turn it on, > the META-Q (ie. fill-paragraph) does nothing (ie does not > wrap my lines in a javadoc comment) Do you have any idea of > what I missed? > > Can you tell me what benefits brings 'filladapt' over > emacs20-7 in the javadoc wrapping? > > Here is what I get when I use the builtin version: > > /** >* Creates an empty query >* @param uid The unique identifier of the query. This uid > should contain both the client Id and the query index. Use > the generateId method to generate this Id, and > the getClientUid() and > > gets transformed into: > > /** >* Creates an empty query >* @param uid The unique identifier of the query. This uid should >* contain both the client Id and the query index. Use the >* generateId method to generate this Id, and the >* getClientUid() and > > What I would dream of having done automatically is the following: > > /** >* Creates an empty query >* @param uid The unique identifier of the query. > This uid should contain >* both the client Id and the query index. > Use the generateId >* method to generate this Id, and > > Do you know if 'filladapt' can be configured to do such formatting? > > Many thanks, > > Guillaume. > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > > Sent: Friday, January 19, 2001 1:15 PM > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > Subject: AW: Paragraph filling... > > > > > > I recommend using filladapt.el (get it from > http://wonderworks.com/) > > which does a much better job of > filling than the standard one. > > > > After installing this package you can modify the variable > > 'filladapt-token-table' > > like follows (add these elements to the variable): > > > > ("@param[ \t]" bullet) > > ("@see[ \t]" bullet) > > ("@return[ \t]" bullet) > > ("@exception[ \t]" bullet) > > > > I´m sure you are able to add further javadoc-keywords if you > > need them :-) > > > > After that all your JAVADOC comments wil be filled correct. > > > > Hope this helps, > > Klaus >
AW: align.el with JDE
JDE resets all jde-options/settings to either the user-customized or the jde-default value. This occurs at buffer-opening/switching time, means every time you open/switch-to a jde-buffer this is done. I don´t know but i suppose the M-[ is already defined in some JDE-bindings which are reset like i have described above. But i don´t know... Klaus -Ursprüngliche Nachricht- Von: Denis, Ronald J (Ronald)** CTR ** [mailto:[EMAIL PROTECTED]] Gesendet am: Freitag, 26. Januar 2001 16:09 An: '[EMAIL PROTECTED]' Betreff: align.el with JDE I am having difficulty getting align to work in the jde. I placed the following in my .emacs: (require 'align) (global-set-key "\M-[" 'align) Then I select a region, run align and nothing happens. Has anyone gotten this to work? Ron Denis E-mail : [EMAIL PROTECTED] Consultant Lucent Technologies Inc.
AW: align.el with JDE
http://www.gci-net.com/users/j/johnw/emacs.html >The header of my align.el is in fact different. But it is by John Wiegley. >Must be older.. I am unable to reach his web site from my location. Either >it is down or we are having proxy trouble. Would you mind forwarding it to >me so that I can try it?
Debugging Bea Weblogic EJB Applications
Hello, im using Bea Weblogic 5.1 for Solaris 5.6. JDK 1.3.0 and all necessary patches needed by the JPDA debugging platform (and therefore by JDEbug). JDE 2.2.6 and Emacs 20.7 are used. I´have successfully tried to debug some simple standalone java-programs with JDEbug. It seems to work ok, means in pricipal JDEBug works with Solaris too not only with Windows platforms. Ok, now my question/problem: I want to debug our project, means an EJB application run by the Bea weblogic. Now i can remember that in this mailing-list there were some threads concerning exactly this topic (unfortunatelly a long time ago, i think at least some month). Therefore i have tried to find the articles in the searchable mailing-list mentioned on the JDE website, but without access (i have searched for weblogic, application, ejb ...) To make a long story short: Anybody out there who has debugged an ejb-application with Bea weblogic and who can give me some startup-hints or JDEbug-configuratuion-tips or anything helpful? Or where can i find the articles i have mentioned above if not in the searchable mailing list? Any help would be appreciated a lot, Klaus -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
AW: Hippie expand
>By default M-/ is bound to dabbrev-expand, which subsumes the function of >hippie-expand This is completely wrong...the inverse direction is correct: hippie-expand contains most of the function of dabbrev-expand but not reversely. E.g. hippie-expand can also expand file- and pathnames which is not possible by dabbrev-expand. Ciao, Klaus
AW: setting up a printer
1. Go to http://www.cpqd.com.br/~vinicius/emacs/Emacs.html and download printing.el.gz and ps-print.tar.gz. 2. Install both packages (its very easy) 3. Setup your printer (it´s really well documented) 4. The you get a really nice new submenu "printing" under the "Tools" menu which offers all printing-stuff interactively per one mouse-click. You will be wishless happy (of course only about printing-stuff i think :-) regardless if you are using Window- or Unix-platforms. IMHO both packages are one of the most useful packages available because it makes one of the most important jobs of an editor (printing a buffer) really easy and conveniant. >If it is printed in 2-page format per one side of the page, then >set-variable on ps-number-of-columns is the place to reset it. If it is >printed in the front and back of the page, then I guess most probably is the >Windows print driver setting (Assuming that you are using Windows or NT) >rather than Emacs.
jde@sunsite.dk
The best way to convert programming styles for java, c++ and c i know is an outstanding tool named "Artistic style". It´s free and you can get it from http://astyle.sourceforge.net/ There are sources and binaries available for Linuy and Win32. This small and fast tool converts between any style and you can specify in very fine detail how your sources should look (indentation, brace-seeting etc, etc). It´s is really great! P.S. Not for every task Emacs is the best solution! (only for almost every :-) Klaus >Sorry if this has been asked already. I checked the archive, but didn't find >any answers. >Is there a way to convert a non-k&r style Java source to k&r style? (I.e., >not have the opening braces occupy a whole line.)
jde@sunsite.dk
>Will that reparse and change the source? I would expect that toggle to only >effect new code. >Jeff Yes, this only affects new code. See my answer to Daniel for an outstanding tool to convert existing sources! Klaus -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Stephane Sent: Tuesday, February 06, 2001 5:23 PM To: Daniel Hegyi Cc: [EMAIL PROTECTED] Subject: Re: convert to k&r Hi daniel, you must M-x customize-group jde-gen and toggle the k&r style off. (Don't forget to save your settings) Steff Daniel Hegyi wrote: > Hi, > > Sorry if this has been asked already. I checked the archive, but didn't find > any answers. > > Is there a way to convert a non-k&r style Java source to k&r style? (I.e., > not have the opening braces occupy a whole line.) > > Thanks. > Regards, > Daniel > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com
Opening the definition of class/method/variable/attribute at point
(setq found t) (find-file java-file-name) ;; Now let´s jump to the thing-of-interest. If this is a ;; variable-name then we will not find this with senator in ;; the opened java-file so we search for the definiton of ;; the class itself. This faeture is only available if we ;; have senator! (when (fboundp 'senator-search-forward) (beginning-of-buffer) (senator-parse) (if (not (senator-search-forward thing-of-interest nil t)) (senator-search-forward (progn (string-match ".*/\\([^/]+\\)\\.java" class-to-open) (match-string 1 class-to-open)) nil t) (if (not found) (error "Can not find the sourcecode-file for \"%s\"" thing-of-interest))) (error "Can not parse the thing at point!"))) (message "You need JDE >= 2.2.6 and Senator for using this feature!"))) -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
resetting jde-options after each buffer-switch problem
In general i find the project switching mechanism and related setting of all jde-options to the values of the new project file or - if there is no project file - resetting the values to the ones set in .emacs or - if there are no new values set - to the JDE default values. Really tricky and nice. But there are situations, where this is very annoying. I´m writing an extension to JDE which can open always the java-file where the current thing at point is defined. For the opening function of this new feature i have written a new jde-option: (defcustom jde-open-class-at-point-find-file-function 'find-file-other-window "Define the function for opening the class at point. See `jde-open-class-at-point'`. Default is `find-file-other-window'. A function defined here must have the same signature as `find-file' means the first argument is the filename and the second optional argument is a wildcard-pattern." :group 'jde-project :type '(function :tag "Function to open class at point")) This is useful because maybe a user want to define the behavior how the java-file is opened ( in another window or the same window for example). But also some other Tools like JCB (java class browser) want to change the value of this new option for the time they are active, because they need an own special "xyc-find-file" function used with the new openeing feature because the tool uses a special window layout for example. Now comes the problem: How should such a tool set an own value for 'jde-open-class-at-point-find-file-function (see above) with setq if after each buffer-switch to another jde-buffer the default or customized value is reset? IMHO 'custom-set-variables from within elisp-code should not be used to change temporaly the value of an option! IMHO JDE should offer an mechanism to exclude certain options from the automatic reset after each buffer switch, maybe with an new option 'jde-no-project-related-options where we can define all jde-options which should be excluded. IMHO such options like the one i have defined new (see above) are never project related, regardless of the project a user will always use the same value Setting 'jde-project-context-switching-enabled-p to nil is IMHO not an alternative because this disables the whole mechanism for every jde-option, and like said at beginning, in genral this feature is nice, but not always and not for EVERY option! What do you mean? Klaus -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
AW: jde-stack.el 1.0.1
Hello, this is a little bit offtopic, but i must make some words to the attached fm.el: IMHO there is no need for fm.el, because we have already with next-error, previous-error, compilation-goto-error etc. all necessary and these functions have the great advantage that i´m not needed to be in the compilation buffer but they also work if i´m in my source-buffer (and this is what i want, because i want to correct my errors and i don´t want to jump between the source-buffer and the compilation-buffer to go/highlight the next error! But i don´t want make bad the spirit and the work of fm.el, i find highlighting the error-line in the source buffer is a really nice idea!! But this goal can be achieved with much less effort, look at the following code (just insert it somewhere in your emacs-initialisation file(s)). This code enables all "error-jumping" functions from compile.el highlighting the error-line in the source-buffer if you want that (look at the new option 'compilation-highlight-source-buffer. - code begins --- ;; enhancement of next-error: with this advice it highlights the error-line in ;; the sourcebuffer. (defcustom compilation-highlight-source-buffer t "*If not nil then highlight the error-line in the source-buffer." :group 'compilation :type 'boolean) (defvar compilation-source-buffer-overlay (make-overlay 1 1) "Overlay used for the error-line in the source-buffer") (overlay-put compilation-source-buffer-overlay 'face 'highlight) (add-hook 'pre-command-hook (lambda () (delete-overlay compilation-source-buffer-overlay))) (defadvice next-error (after sourde-highlight activate) "Highlights in the source-buffer the line with the error." (when compilation-highlight-source-buffer (delete-overlay compilation-source-buffer-overlay) (move-overlay compilation-source-buffer-overlay (save-excursion (beginning-of-line) (point)) (save-excursion (end-of-line) (point) - code ends -- This is only a first "hack" from me, and therefore maybe not perfect, but maybe someone enjoys...:-) Klaus
Question for method completion
What can be the reason that jde-complete-at-point only gets the public-methods and no private ones?? For example: Suppose i want to complete this. Then this should give me a list off all methods (regardless of public or private) but it offers only the public ones (plus the stuff from the all the extended baseclasses). This occurs on Solaris 2.6 with JDK 1.3 and compiled with jikes, not javac! If i do something similar with NT 4.0, JDK 1.3 and compiled with javac, all is working fine (means i get also private methods). Can jikes be the problem that the beanshell doesn´t find the private methods (i have tried to debug the JDE completion code and it seems that 'jde-complete-get-classinfo' and here the line '(bsh-eval-r (concat "jde.util.Completion.getClassInfo(\"" name "\");"))' only returns the public-stuff and not the private ones too!! I´m really sure, that my CLASSPATH and all related things with JDE are correctly setup!! I´m using JDE 2.2.6.2, Emacs 20.7 and Solaris 2.6 / Windows NT 4.0. Any ideas? MTIA, Klaus -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
AW: filling javadoc comments
> take a look at filladapt-mode > http://cc-mode.sourceforge.net/filladapt.php Yes and then you must ajust the option filladapt-token-table: Call "M-x customize-option RET filladapt-token-table RET" and then add the following elements (but do not add this at the end but add it before the last to items already defined; for this simply press the related [INS]-button) After your changes the customize buffer should look like: ... [INS] [DEL] List: Regexp: @param[ ] Symbol: bullet [INS] [DEL] List: Regexp: @return[] Symbol: bullet [INS] [DEL] List: Regexp: @see[ ] Symbol: bullet [INS] [DEL] List: Regexp: @exception[ ] Symbol: bullet [INS] [DEL] List: Regexp: [ ]+ Symbol: space [INS] [DEL] List: Regexp: $ Symbol: end-of-line [INS] [State]: this option has been set and saved. Please note the last two elements are already there as default value of this option. Please note also that [ ] is a space and a tab between brackets. Then [Save for Future Sessions] and you will get well filled Javadocs! Hope this helps, Klaus > -Original Message- > From: Martin Monsorno [SMTP:[EMAIL PROTECTED]] > Sent: Friday, March 02, 2001 11:57 AM > To: jde mailing list > Subject: filling javadoc comments > > I often use M-q inside of javadoc-comments to automatically break > long lines. The problem is: when I have this: > @param id an id > @return something useful > the result is: > @param id an id @return something useful > > Does anybody know how to prevent emacs from filling lines with tags? > > -- > Martin Monsorno > mailto:[EMAIL PROTECTED]
AW: AW: filling javadoc comments
Hi Paul, yes, i think this would be a good idea. Either you put filladapt.el onto the requirement-list of JDE (but i would not do this because JDE can also work without filladapt but not without the other requirements) or you add some code to JDE like: (if (and (boundp 'filladapt-token-table) (not (assoc "@param[ \t]" filladapt-token-table)) ;; same for the other javadoc-tokens ) ;; 1. activate filladapt-mode ;; 2. the tokens are not already added so add the tokens ) maybe you could add another JDE-option jde-fill-comments with t as default so a user can decide this, because this would activate filladapt-mode and maybe not every user want to have this automatic filling. BUT IMHO automatic comment filling is one of the outstanding features of Emacs in comarison to other editors or IDEs! To make a long story short: I find this a good idea and i´m sure you find the right way to do it :-) Klaus >Hi Klaus >Do you think it would be a good idea for the JDE >to require filladapt and set it up to do filling >correctly on Javadoc comments? >- Paul At 01:01 PM 3/2/2001 +0100, you wrote: >> take a look at filladapt-mode >> http://cc-mode.sourceforge.net/filladapt.php > >Yes and then you must ajust the option filladapt-token-table: >Call "M-x customize-option RET filladapt-token-table RET" and then >add the following elements (but do not add this at the end but add it >before the last to items already defined; for this simply press the >related [INS]-button) > >After your changes the customize buffer should look like: > >... >[INS] [DEL] List: >Regexp: @param[] >Symbol: bullet >[INS] [DEL] List: >Regexp: @return[ ] >Symbol: bullet >[INS] [DEL] List: >Regexp: @see[ ] >Symbol: bullet >[INS] [DEL] List: >Regexp: @exception[] >Symbol: bullet >[INS] [DEL] List: >Regexp: [ ]+ >Symbol: space >[INS] [DEL] List: >Regexp: $ >Symbol: end-of-line >[INS] > [State]: this option has been set and saved. > >Please note the last two elements are already there as default value of this >option. Please note also that [] is a space and a tab between brackets. > >Then [Save for Future Sessions] and you will get well filled Javadocs! > >Hope this helps, >Klaus > > > > > > > > >> -Original Message- >> From:Martin Monsorno [SMTP:[EMAIL PROTECTED]] >> Sent:Friday, March 02, 2001 11:57 AM >> To: jde mailing list >> Subject: filling javadoc comments >> >> I often use M-q inside of javadoc-comments to automatically break >> long lines. The problem is: when I have this: >> @param id an id >> @return something useful >> the result is: >> @param id an id @return something useful >> >> Does anybody know how to prevent emacs from filling lines with tags? >> >> -- >> Martin Monsorno >> mailto:[EMAIL PROTECTED]
WG: automatic parsing of jikes' error messages: next-error
hello Paul, please look at my answer below to someones jikes-parsing problem. Maybe it would be useful if JDE contains a test similar the one i wrote below to check if the variable 'compilation-error-regexp-alist' is set correct for jikes and javac (This test could be done easily with two example error-message of both compilers). If the value is incorrect JDE could automatically add the needed regexp. What do you think? Klaus >When an error occurs, javac produces messages in a format like > Test.java:5: cannot resolve symbol >while the output of jikes is like > Test.java:5:5:5:7: Error: Type Bla was not found. >The problem are the numbers following the line number: After executing >next-error a second time, emacs is asking: > Find this error in: (default 5) ~/tmp/ For me compiling with jikes and the option +E works. I´m using Emacs >= 20.5 onto Windows NT and Solaris 2.6 and JDE 2.2.6.2. Maybe your variable 'compilation-error-regexp-alist' is set incorrect. You can check it with this little test i hacked quickly: (defun jikes-test () (interactive) (let ((tmp-list compilation-error-regexp-alist) ;; the following is a sample error-output from jikes +E (str "AdapterAdministration.java:27:25:27:29: Error: Type de/hvb/ha/adapter/Strin was not found") (counter 0) elem found) (while (and tmp-list (not found)) (setq counter (1+ counter)) (setq elem (car tmp-list)) (setq tmp-list (cdr tmp-list)) (when (string-match (car elem) str) (message "%d. Regexp of compilation-error-regexp-alist matched, File: %s, Line: %s" counter (match-string (nth 1 elem) str) (match-string (nth 2 elem) str)) (setq found t))) (if (not found) (message "Not found" Hust put this into your .emacs file and reload it, then call jikes-test. If your compilation-error-regexp-alist is set correct the following message should appear: "1. Regexp of compilation-error-regexp-alist matched, File: AdapterAdministration.java, Line: 27" (Maybe the number of the matching regexp can be different). If the message "Not found" appears, your velaue is incorrect. Here is the value of compilation-error-regexp-alist i use (it´s the default one of Emacs >= 20.5!): (("\\([a-zA-Z][-a-zA-Z._0-9]+: ?\\)?\\([a-zA-Z]?:?[^:( \n]*[^:(\n0-9][^:( \n]*\\)[:(][]*\\([0-9]+\\)\\([) ]\\|:\\(\\([0-9]+:\\)\\|[0-9]*[^:0-9]\\)\\)" 2 3 6) ("\\(\\([a-zA-Z]:\\)?[^:( \n]+\\)(\\([0-9]+\\)) : \\(error\\|warning\\) C[0-9]+:" 1 3) ("\\(Error\\|Warning\\) \\(\\([FEW][0-9]+\\) \\)?\\([a-zA-Z]?:?[^:(\n]+\\) \\([0-9]+\\)\\([) ]\\|:[^0-9\n]\\)" 4 5) (".*[ :]\\([a-zA-Z]?:?[^:(\n]+\\)[:(](+[ ]*\\([0-9]+\\))[:) ]*$" 1 2) (".*([ ]*\\([a-zA-Z]?:?[^:(\n]+\\)[:(][]*\\([0-9]+\\))" 1 2) ("[^\n ]+ (\\([0-9]+\\)) in \\([^ \n]+\\)" 2 1) (".*in \\([^(\n]+\\)(\\([0-9]+\\))$" 1 2) ("\\(cfe\\|fort\\): [^:\n]*: \\([^ \n]*\\), line \\([0-9]+\\):" 2 3) ("\\(.* on \\)?[Ll]ine[]+\\([0-9]+\\)[ ]+of[ ]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2) (".*\"\\([^,\" \n ]+\\)\", lines? \\([0-9]+\\)\\([(.]\\([0-9]+\\))?\\)?[:., (-]" 1 2 4) ("^File \"\\([^,\" \n ]+\\)\", lines? \\([0-9]+\\)[-0-9]*, characters? \\([0-9]+\\)" 1 2 3) ("[a-z0-9/]+: \\([eE]rror\\|[wW]arning\\): \\([^,\" \n ]+\\)[,:] \\(line \\)?\\([0-9]+\\):" 2 4) (".*in line \\([0-9]+\\) of file \\([^ \n]+[^. \n]\\)\\.? " 2 1) (" +\\([0-9]+\\) +.*\n[ew] [0-9]+-+" nil 1) ("[Ew] +[0-9]+ line \\([0-9]+\\) - " nil 1) ("[EW], \\([^(\n]*\\)(\\([0-9]+\\),[ ]*\\([0-9]+\\)" 1 2 3) ("\\(cc\\| cft\\)-[0-9]+ c\\(c\\|f77\\): ERROR \\([^,\n]+, \\)* File = \\([^,\n]+\\), Line = \\([0-9]+\\)" 4 5) ("\\([^( \n]+\\)(\\([0-9]+\\):\\([0-9]+\\)) : " 1 2 3) ("\"\\(.*\\)\",\\([0-9]+\\)\\s-+\\(Error\\|Warning\\)\\[[0-9]+\\]:" 1 2) ("\\([^, \n]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., (-]" 1 2 3) (".* at \\([^ ]+\\) line \\([0-9]+\\)," 1 2) ("Semantic error at line \\([0-9]+\\), column \\([0-9]+\\), file \\(.*\\):" 3 1 2) ("Error [0-9]+ at (\\([0-9]*\\):\\([^)\n]+\\))" 2 1) (".* ERROR [a-zA-Z0-9 ]+, File = \\(.+\\), Line = \\([0-9]+\\), Column = \\([0-9]+\\)" 1 2 3)) Hope this helps, Klaus
AW: automatic parsing of jikes' error messages: next-error
>When an error occurs, javac produces messages in a format like > Test.java:5: cannot resolve symbol >while the output of jikes is like > Test.java:5:5:5:7: Error: Type Bla was not found. >The problem are the numbers following the line number: After executing >next-error a second time, emacs is asking: > Find this error in: (default 5) ~/tmp/ For me compiling with jikes and the option +E works. I´m using Emacs >= 20.5 onto Windows NT and Solaris 2.6 and JDE 2.2.6.2. Maybe your variable 'compilation-error-regexp-alist' is set incorrect. You can check it with this little test i hacked quickly: (defun jikes-test () (interactive) (let ((tmp-list compilation-error-regexp-alist) ;; the following is a sample error-output from jikes +E (str "AdapterAdministration.java:27:25:27:29: Error: Type de/hvb/ha/adapter/Strin was not found") (counter 0) elem found) (while (and tmp-list (not found)) (setq counter (1+ counter)) (setq elem (car tmp-list)) (setq tmp-list (cdr tmp-list)) (when (string-match (car elem) str) (message "%d. Regexp of compilation-error-regexp-alist matched, File: %s, Line: %s" counter (match-string (nth 1 elem) str) (match-string (nth 2 elem) str)) (setq found t))) (if (not found) (message "Not found" Hust put this into your .emacs file and reload it, then call jikes-test. If your compilation-error-regexp-alist is set correct the following message should appear: "1. Regexp of compilation-error-regexp-alist matched, File: AdapterAdministration.java, Line: 27" (Maybe the number of the matching regexp can be different). If the message "Not found" appears, your velaue is incorrect. Here is the value of compilation-error-regexp-alist i use (it´s the default one of Emacs >= 20.5!): (("\\([a-zA-Z][-a-zA-Z._0-9]+: ?\\)?\\([a-zA-Z]?:?[^:( \n]*[^:(\n0-9][^:( \n]*\\)[:(][]*\\([0-9]+\\)\\([) ]\\|:\\(\\([0-9]+:\\)\\|[0-9]*[^:0-9]\\)\\)" 2 3 6) ("\\(\\([a-zA-Z]:\\)?[^:( \n]+\\)(\\([0-9]+\\)) : \\(error\\|warning\\) C[0-9]+:" 1 3) ("\\(Error\\|Warning\\) \\(\\([FEW][0-9]+\\) \\)?\\([a-zA-Z]?:?[^:(\n]+\\) \\([0-9]+\\)\\([) ]\\|:[^0-9\n]\\)" 4 5) (".*[ :]\\([a-zA-Z]?:?[^:(\n]+\\)[:(](+[ ]*\\([0-9]+\\))[:) ]*$" 1 2) (".*([ ]*\\([a-zA-Z]?:?[^:(\n]+\\)[:(][]*\\([0-9]+\\))" 1 2) ("[^\n ]+ (\\([0-9]+\\)) in \\([^ \n]+\\)" 2 1) (".*in \\([^(\n]+\\)(\\([0-9]+\\))$" 1 2) ("\\(cfe\\|fort\\): [^:\n]*: \\([^ \n]*\\), line \\([0-9]+\\):" 2 3) ("\\(.* on \\)?[Ll]ine[]+\\([0-9]+\\)[ ]+of[ ]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2) (".*\"\\([^,\" \n ]+\\)\", lines? \\([0-9]+\\)\\([(.]\\([0-9]+\\))?\\)?[:., (-]" 1 2 4) ("^File \"\\([^,\" \n ]+\\)\", lines? \\([0-9]+\\)[-0-9]*, characters? \\([0-9]+\\)" 1 2 3) ("[a-z0-9/]+: \\([eE]rror\\|[wW]arning\\): \\([^,\" \n ]+\\)[,:] \\(line \\)?\\([0-9]+\\):" 2 4) (".*in line \\([0-9]+\\) of file \\([^ \n]+[^. \n]\\)\\.? " 2 1) (" +\\([0-9]+\\) +.*\n[ew] [0-9]+-+" nil 1) ("[Ew] +[0-9]+ line \\([0-9]+\\) - " nil 1) ("[EW], \\([^(\n]*\\)(\\([0-9]+\\),[ ]*\\([0-9]+\\)" 1 2 3) ("\\(cc\\| cft\\)-[0-9]+ c\\(c\\|f77\\): ERROR \\([^,\n]+, \\)* File = \\([^,\n]+\\), Line = \\([0-9]+\\)" 4 5) ("\\([^( \n]+\\)(\\([0-9]+\\):\\([0-9]+\\)) : " 1 2 3) ("\"\\(.*\\)\",\\([0-9]+\\)\\s-+\\(Error\\|Warning\\)\\[[0-9]+\\]:" 1 2) ("\\([^, \n]+\\), line \\([0-9]+\\), char \\([0-9]+\\)[:., (-]" 1 2 3) (".* at \\([^ ]+\\) line \\([0-9]+\\)," 1 2) ("Semantic error at line \\([0-9]+\\), column \\([0-9]+\\), file \\(.*\\):" 3 1 2) ("Error [0-9]+ at (\\([0-9]*\\):\\([^)\n]+\\))" 2 1) (".* ERROR [a-zA-Z0-9 ]+, File = \\(.+\\), Line = \\([0-9]+\\), Column = \\([0-9]+\\)" 1 2 3)) Hope this helps, Klaus
AW: ECB 1.0 released
> ECB layout looks great. > I can not seem to get ECB-method window to display methods in my C or > C++(file extensions .cxx, .hxx)files. Methods are displayed OK for .h > files. I have customized ECB so that it shows .cxx .hxx > files. I don't > know if this is a current limitation or is there something > else that I have > to do besides ecb-activate. Current released semantic is not able to parse C++! But C should work! I have tried current CVS-ECB with a C-source (cmdproxy.c from curretn NTEmacs distrib. :-) and it works perfectly. But rumors say, that CVS-semantic is able to parse C++. Maybe you must get anonymous CVS access to semantic and try it again with ECB then. > > I am using NT Emacs 20.7.1 with semantic 1.3.2, JDE2.2.5, > CC-mode-5.27. > > Any help is highly appreciated. It´s ok, but you should be aware, that this is NOT an ECB mailing list but only a JDE /java mailing list and not for C++ or C!
AW: convert existing .java file?
Mark the whole file and then call "M-x untabify". Klaus > -Ursprüngliche Nachricht- > Von: Sing HU [mailto:[EMAIL PROTECTED]] > Gesendet am: Montag, 26. März 2001 17:46 > An: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] > Betreff: RE: convert existing .java file? > > This is definitely an emacs question and not JDE specific BUT. > > That seemed to work but I noticed that I have spaces before > methods, statements, and "{}" and tabs before variable > declarations. How can ensure that I have no tabs and only > spaces as whitespace??? > > >Reply-To: <[EMAIL PROTECTED]> > >From: "Sandip Chitale" <[EMAIL PROTECTED]> > >To: "'Sing HU'" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > >Subject: RE: convert existing .java file? > >Date: Fri, 23 Mar 2001 15:44:51 -0800 > > > >C-x h M-x indent-region Ret > > > >HTH, > >Sandip V. Chitale > >work: (408) 535 1791 > >email: [EMAIL PROTECTED] > >web: http://www.brokat.com > > > >March 22.-28.2001 CeBIT > >Visit Brokat Technologies in Pavilion P32, our new location! > > > > > > > >> -Original Message- > >> From: Sing HU [mailto:[EMAIL PROTECTED]] > >> Sent: Friday, March 23, 2001 1:31 PM > >> To: [EMAIL PROTECTED] > >> Subject: convert existing .java file? > >> > >> > >> I have set up my (defun my-jde-mode-hook () > >> the way I like it. Now when I load an existing .java file I notice > >> that the jde options only apply to new code that I add to that file > >> using emacs. > >> > >> How can I re-format the entire file so that the hook options can be > >> applied to the entire file? > >> > >> > >> > >> > >> --== Sent via Deja.com ==-- > >> http://www.deja.com/ > >> > >> > >> > > > > > > --== Sent via Deja.com ==-- > http://www.deja.com/ > >
AW: AW: jde-help-find-javadoc problem in beta4
> > Wouldn't it be cleaner just to change line 110 from > > > > (if (which "wget") > > > > to > > > > (if (executable-find "wget") > > > > executable-find has the advantage of being in the standard emacs > > distribution (Emacs 20.7), so there's no need to bundle anything > > further with the JDE or to define any new functions. I > don't know if > > it's included in earlier versions of Emacs or in XEmacs, > but the file > > does look like it's been in there for a few years. > > I'm running XEmacs 21.1.14 and it appears it doesn't have > executable-find. So I guess we still need which.el... Yes and No. Yes because JDE needs it´s own function (cause of the lack of XEmacs not to have executable-find) and No because we don´t need which.el. I have mailed yesterday with Paul and have sent him a function jde-find-exec which he has included in the cvs-sources. So we don´t have a further dependency to another package for such a small utility-function! Klaus
jde-compile-jde buggy
IMHO jde-comopile-jde is buggy. Here is a working version; i have all commented out what is buggy or not necessary: (defun jde-compile-jde () "Byte-compile all uncompiled files of jde." ;; Be sure to have . in load-path since a number of files in jde ;; depend on other files and we always want the newer one even if ;; a previous version of jde exists. (interactive) (let ((load-path (append '(".") load-path)) ;; (buffer-directory (file-name-directory (buffer-file-name))) ;; never used (jde-lisp-directory (expand-file-name "lisp" (jde-find-jde-data-directory (save-excursion ;; (dired jde-lisp-directory) (mapcar (function jde-compile-file-if-necessary) ;;(mapcar ;; (lambda (file) ;;(expand-file-name file jde-lisp-directory)) (directory-files jde-lisp-directory t) Not the additional parameter in (directory-files ...). This makes the second mapcar superfluous. Klaus -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
AW: AW: AW: jde-help-find-javadoc problem in beta4
> Also, executable-find is *not* in the standard Emacs (20.7) > distribution. I > don't know what the original poster might have been thinking of. I do, because in my emacs-20-7.tar.gz source-distribution (Gnu Emacs 20.7) is in lisp/progmodes/executable.el the fuunction 'executable-find'. Do you have a different 20.7 distribution? :-) Klaus
AW: AW: AW: jde-help-find-javadoc problem in beta4
> Does the XEmacs distribution include any equivalent to > executable-find? After searching a little bit around in my test-XEmacs i have found (exec-installed-p "tex.exe"). This seems to be the equivalent of executable-find. The difference seems to be that exec-installed-p must always be called with the extension under NT (e.g. always "tex.exe" instead of "tex" like with executable-find). But with extension seems to work with both functions... Seems as if we don´t jde-find-exec, just using one of these function for the (X)Emacs is enough. Sometimes it is not bad to search before hacking, next time i know :-)) > > > - Paul >
Bug in the jde-java-font-lock.api stuff
The following is correct highlighted: System.out.println means, the "System" has the jde-java-font-lock-api-face, but the following is not: System.out.println( or System.out.println ( Only adding a paren (with or without space) prevents the "System" from beeing highlighted. Why? Ciao, Klaus -- Klaus Berndlmailto: [EMAIL PROTECTED] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220
AW: Bug in the jde-java-font-lock.api stuff
Forget the following, my fault!!! Sorry for the noise, Klaus > The following is correct highlighted: > > System.out.println > > means, the "System" has the jde-java-font-lock-api-face, > but the following is not: > > System.out.println( > > or > > System.out.println ( > > Only adding a paren (with or without space) prevents the > "System" from beeing > highlighted. > > Why? > > Ciao, > Klaus > > > -- > Klaus Berndl mailto: [EMAIL PROTECTED] > sd&m AG http://www.sdm.de > software design & management > Thomas-Dehler-Str. 27, 81737 München, Germany > Tel +49 89 63812-392, Fax -220 >
AW: Using ECB and JDE
> If you are using Xemacs... > [(control x) 6 ] Saves the window configuration > [(control x) j From one of the developers of ECB: Because ECB save some internal states about splitting the edit-window of ECB etc. The easiest and best way to restore your original layout is always calling the command 'ecb-redraw-layout'. You should bind it to a key like F10! then you must only hit F10 and bob is your uncle. Or you download the latest CVS-version of ECB (http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/?cvsroot=ecb, simply download all *.el-files, *.txt files and make.bat and makefile, and read readme.txt) This newest (not yet released but also stable) version has a new option 'ecb-compile-window-temporally-enlarge' where you can define if the compile-window of ECB is allowed to be temporally enlarged. This works for all compilation-output like compile, grep etc. Running a programm still enlarges the compile-window; here you must call 'ecb-redraw-layout' to restore the layout! Hope this helps, Klaus > > -- > > From: Marc Brooks[SMTP:[EMAIL PROTECTED]] > > Sent: Monday, April 02, 2001 1:45 PM > > To: JDE Mailing list > > Subject:Using ECB and JDE > > > > Hi all - I've got a question about a setup for JDE and ECB. > I have ECB > > 1.10 and JDE 2.2.7beta4. Everything is working, but when I compile > > something, the scratch window grows to take up have the > screen. Running > > a program causes the same thing to happen. I'm trying to > figure out how > > I could create some function to shrink the scratch window > easily. Maybe > > even have it automatically happen when I move back to the > source buffer. > > > > Any ideas? > > > > Thanks, > > Marc > > >
AW: AW: syntax lost in jde-mode when default face specified in .emacs
>> > >> This sounds to me as if it could be the semantic-problem mentioned >> on the semantic-homepage (you need semantic if you install JDE). >> On the semantic-site there is a file overlay-fix.el offered which you >> have to install. Then the fontification-problem should be gone. >> >> In ever case it is worth a try i think. >> >> Klaus >> >> P.S. >> You find the link to the semantic-site onto the JDE-site. >> > > > I downloaded the file but how do I use the overlay-fix.el (I'm new to > Emacs). 1. simply put it somewhere of your load-path (e.g. the subdirectory site-lisp of your emacs-installation). 2. stick into your .emacs file: (require 'overlay-fix) 3. restart Emacs 4. Done. This is all you have to do. Klaus > > Thanks for you help, > Greg > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com >
AW: use w3 instead of wget?
> I have a small comment regarding jde-help. I've seen that the > function jde-help-symbol makes use of the function > jde-help-find-javadoc which checks whether a certain url exists. It > does that by invoking the shell command wget. I think wget is a nice > utility but I think it would be even nicer to use the w3 package. For > one thing I quite often use w3 anyways, but more important: using web > proxies with authentication (which is used where I work) is far easier > than with wget. You only have to set the variable url-proxy-service > and w3 will prompt you for login (defaulting to user-login-name) and > password the first time w3 is used to fetch a url in a emacs session. > I know that you can have a .wgetrc file with that information in it, > but I find that almost more inconvenient because I don't like entering > my password in 20 places. I agree in all points. Good idea!! > > So this is what I've done to use w3 (note that if w3 is not loaded > wget will still be used): > > - put (load "w3" t t) somewhere near the top of jde-help.el I would not load the whole w3 only for this function. Try this near the top of jde-help.el: (if (locate-library "url") (autoload 'url-file-exists "url" nil nil nil)) > - changed jde-help-find-javadoc to the following: > > (defun jde-help-find-javadoc (class docset-dir) > "Searches DOCSET-DIR for the javadoc HTML page > for CLASS and, if found, returns the URL of the > javadoc page for CLASS. This function uses > wget to verify the existense of pages located > on remote systems." > (let ((class-path >(concat (substitute ?/ ?. class) ".html")) > url) > (cond > ((string-match "http:" docset-dir) > (setq url (concat docset-dir "/" class-path)) > (if (featurep 'w3) change the last line to: (if (fboundp 'url-file-exits) > (if (not >(url-file-exists url)) > (setq url nil)) > (if (executable-find "wget") > (if (not > (string-match > "200" > (shell-command-to-string >(concat "wget --spider " url > (setq url nil)) > (error >(concat "Cannot find wget. This utility is needed " >"to access javadoc on remote systems.") > (t > (let ((doc-path >(expand-file-name class-path docset-dir))) > (if (file-exists-p doc-path) > (setq url (format "file://%s" doc-path)) > url)) > > I am no elisper so I don't know what I did is absolutely correct, but > the old behaviour should still be the same. See my little modifications but now it should work. Really good idea! Klaus
AW: AW: AW: JDebug Improvement Suggestion
> >IMHO (please correct me if i say nonsens) it seems there is > >a little bit > >develoment-stagnancy for JDEBug??!! > > Absolutely, about a year ago, the advent of semantic plus a host of > contributions from JDE users diverted my attention from > JDEbug. I have > felt very bad all along about neglecting JDEbug, which I regard as > basically an early beta version, and have been anxious all > along to get > back to it. But the recent string of reports of JDEbug > hanging at startup > plus the absence of feature requests and comments (contrasted > with the many > requests in the editing area) made me wonder if anyone was > using JDEbug > and, if not, whether it was worthwhile investing any further time in > JDEbug. Your response plus that of many others has renewed my > determination > to develop JDEbug into a robust and easy-to-use debugging tool. This would be great! If JDEBug enhances to this robust and easy-to-use debugging tool, then IMHO the combination of Emacs, JDE, semantic, JDEBug and ECB (a little bit act of promoting for our Emacs Code browser :-) needn´t conceal oneself behind any commercial product in contrary it´s much better and much more (easy, means not only for hardcore Emacser!) customizable to personal tastes as the other IDE´s. Of course some of them are not bad and have really nice features (e.g. JBuilder) but over all considered...No Chance! :-)
AW: use w3 instead of wget?
> > Knut Wannheden <[EMAIL PROTECTED]> writes: > > > I have a small comment regarding jde-help. I've seen that the > > function jde-help-symbol makes use of the function > > jde-help-find-javadoc which checks whether a certain url exists. It > > does that by invoking the shell command wget. I think wget > is a nice > > utility but I think it would be even nicer to use the w3 package. > > w3 has performance issues. It would be better to toggle > between wget/lynx. I > have a lynx-mode.el if anyone is interested... > http://relativity.yi.org/emacs Is lynx also available for non *nix-users, means all of us who like Windows NT? :-) Is there also a native version for NT or only a cygwin-port? Klaus
AW: Couple of ideas
> Do you have ideas of what other errors could be detected > automatically? I > could only think about unbalanced parenthesis. I don´t think that this necessary, because the cc-mode package (from which jde-mode derives) does it already. If you have some unbalanced parenthesis, indendation will not be correct so i recognize such an error in almost 100% immediately. Also packages like mic-paren.el helps you with unbalanced parenthesis. Klaus
AW: AW: Docking the speedbar
Yes, of course. > -Ursprüngliche Nachricht- > Von: Mark Mynsted [mailto:[EMAIL PROTECTED]] > Gesendet am: Freitag, 27. April 2001 17:06 > An: [EMAIL PROTECTED]; [EMAIL PROTECTED]; > [EMAIL PROTECTED]; [EMAIL PROTECTED] > Betreff: Re: AW: Docking the speedbar > > Would you notify this group when you release the new ECB? I > am very interested. > > Sincerely yours; > > Mark Mynsted > > > > VHA Management Information Systems Client Services > [EMAIL PROTECTED] > (972) 830 - 0592, Internal x1592 > > >>> <[EMAIL PROTECTED]> 4/27/2001 2:49:25 AM >>> > From one of the developer of ECB: > > > but the speedbar is more Java 'smart' then ECB's directory > > browser, which > > only lets you browse into a directory. speedbar shows you > > imports, class > > members, methods, etc. > > > > personally, I'd like to see speedbar just 'dropped' into the > > spot currently > > occupied by the *ECB Directories*, but then you're going to > > see redundant > > information ( method names in both the *ECB Methods* and the > > speedbar, for > > example ). > > > > I guess the upshot is that both speedbar and ecb are trying > > to do the same > > work.Just my 2c, > > AFAIK currently it is impossible to dock speedbar in the same frame or > even in the directory window of ECB. > But your wishes are very interesting. > The advantage of speedbar is it offers a lot of information but the > disadvantage is it offers the information somehow not very > "eyecatching"... > And it needs a second frame. > > IMHO speedbar is superfluos with ECB because the most > important information > you get very "eyecatching" (sources, methods, variables, > directories) and > all the other (IMHO not so important but sometimes useful) > information you can > get via Classes-menu (JDE) or the Functions-menu, which > semantic-imenu.el > creates (here you have all imports etc...). > > We will release soon (maybe this weekend) version 1.20 of ECB > which has fixed > all currently known bugs and a lot of new features which > makes working even more > conveniant :-) > > Klaus > > > > > --Lyle > > > > -Original Message- > > From: Mark Abrams [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, April 26, 2001 12:49 PM > > To: jde > > Subject: Re: Docking the speedbar > > > > > > I use ecb for exactly that reason. > > > > Mark > > > > "Przasnyski, Jeremy" wrote: > > > > > Is there a way to put the speedbar in the same frame as > the rest of > > xemacs? > > > I don't like having it as a floating frame. It will make it > > much easier to > > > organize my windows if I can dock the speedbar. Anyone know a way? > > > > > > -Jeremy > > >
AW: Simple enhancement to jde-help-symbol
Cool! I vote for integrating it in the next JDE release! Klaus > -Ursprüngliche Nachricht- > Von: Robert Mecklenburg [mailto:[EMAIL PROTECTED]] > Gesendet am: Freitag, 27. April 2001 18:25 > An: [EMAIL PROTECTED] > Betreff: Simple enhancement to jde-help-symbol > > I've modified jde-help-symbol to check for a prefix argument, if > present it now prompts for a symbol name rather than grabbing > thing-at-point. This provides easy access to documentation even if > the name isn't in a buffer. Hope you like it: > > (defun jde-help-symbol (arg) > "Displays help for the symbol at point or, with a prefix > argument from the > minibuffer. The symbol may reference an object, a class, or a > method or field. > If the symbol references a class, this function displays the > javadoc for the > class. If the symbol references an object, this method > displays the javadoc for > the class of the object. If the symbol references a field or > a method, this > function displays the javadoc for the class of the object of > which the field or > method is a member. Eventually this function will be enhanced > to position > the javadoc at the point where the method or field is documented." > (interactive "P") > (condition-case err > (let* ((unqualified-name (if arg > (read-from-minibuffer "Help > for symbol: ") >(thing-at-point 'symbol))) >(class-names > (bsh-eval-r > (concat > "jde.util.JdeUtilities.getQualifiedName(\"" unqualified-name > "\");" > (if (not class-names) > (let ((parse-result (jde-help-parse-symbol-at-point))) > (if parse-result > (setq unqualified-name (car parse-result))) > (setq class-names > ;;expand the names into full names, or a > list of names > (bsh-eval-r >(concat > "jde.util.JdeUtilities.getQualifiedName(\"" unqualified-name > "\");") > > ;;Check return value of QualifiedName > (if class-names > (let ((doc-files (mapcar 'jde-help-get-doc class-names))) > (if doc-files > (progn > ;;Remove any annoying nils from the returned values > (setq doc-files (delq nil doc-files)) > (if (eq 1 (length doc-files)) > ;;then show it > (jde-help-show-document (car doc-files)) > ;;else let the user choose > ;;If the list is only one long > (jde-help-choose-document doc-files))) > (error "Cannot find documentation for %s" > unqualified-name))) > (error "Cannot find %s" unqualified-name))) > (error > (message "%s" (error-message-string err) > > > > -- > Robert >
AW: Minor ECB idea
I have added both suggestions to our TODO-list IMHO your suggestions would be very useful! Thanks, klaus > I also enjoy ECB. I have a suggestion: could it support env > vars, like the > latest JDE, for settings like the source paths? > > Another idea is to use the JDE source paths if the JDE > variable is available > (perhaps there are other variables to use by default as well?). > >
AW: jde-find -- more info
> I stepped through jde-find, and it seems that it is calling > executable-find > to find "grep"; however the actual name is "grep.exe" on > Windows. I tried > copying grep.exe to grep, but that didn't work. Any ideas? Yes, it´s a bug in JDE. The GNUEmacs version of executable-find works also for program-names without extension whereas the XEmacs- version needs the complete name incl. extension. I can remember that there was already a discussion about executable-find in this mailing list, concerning finding the "wget" program. IMHO there are two options for JDE: 1. Setting some defconsts: (defconst grep-prog (if (memq system-type '(ms-dos windows-nt)) "grep.exe" "grep")) Then replacing all hard-coded "grep" with grep-prog Same for all other programs JDE needs. Then it doesn´t matter which executable-find version is used. 2. defining the executable-find itself, maybe as jde-executable-find: Here is the code: (defvar jde-executable-binary-suffixes (if (memq system-type '(ms-dos windows-nt)) '(".exe" ".com" ".bat" ".cmd" ".btm" "") '(""))) (defun jde-executable-find (command) "Search for COMMAND in exec-path and return the absolute file name. Return nil if COMMAND is not found anywhere in `exec-path'." (let ((list exec-path) file) (while list (setq list (if (and (setq file (expand-file-name command (car list))) (let ((suffixes jde-executable-binary-suffixes) candidate) (while suffixes (setq candidate (concat file (car suffixes))) (if (and (file-executable-p candidate) (not (file-directory-p candidate))) (setq suffixes nil) (setq suffixes (cdr suffixes)) (setq candidate nil))) (setq file candidate))) nil (setq file nil) (cdr list file)) I vote for the latter one (2.) because it makes the code clean and it removes the ugly dependency to the executable.el from the sh-script-package of XEmacs! Other opinions? Klaus
ECB 1.30 now available
ECB, Emacs Code Browser, version 1.30 is now available at: http://home.swipnet.se/mayhem/ecb.html ECB is a source code browser that displays directories, source files, methods and variables that can be navigated using the mouse (and keyboard). Currently it supports parsing of Java, C and Elisp source code. It is completely written in Emacs Lisp and uses semantic to parse source files. Some of the improvements in version v1.30: - Method and variable at the current cursor position is highlighted. - Support for saving the ECB window sizes. - Incremental search in ECB windows. - Better support for mouse over files and methods. - ECB can now be shown in it's own frame. - ECB now supports Semantic 1.4. - Popup menus should now work in XEmacs. - Easier configuration of the source path. Contributions and suggestions are welcome! /Jesper Nordenberg
AW: Error loading JDE-2.2.7.1
>semantic-1.3.3 >But I get the following error when I start my emacs: You should read carefully the announcements, because there is mentioned that JDE >= 2.2.7 needs semantic >= 1.4beta5! Install this semantic-version and bob will be your uncle :-) Hope this helps, Klaus
AW: JDE 2.2.7.1 available at ...
Cause of senator is now part of semantic 1.4 (which is need by JDE!) JDE should not include any senator files. Paul, can you please remove themn from the distribution?! Thanks, Klaus
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] sd&m AG http://www.sdm.de software design & management Thomas-Dehler-Str. 27, 81737 München, Germany Tel +49 89 63812-392, Fax -220