Skip to content

Commit

Permalink
- contents of jde-remove-inner-class re(moved) to jde-find-class-sour…
Browse files Browse the repository at this point in the history
…ce-file as

  was only used in one place

- jde-with-file-contents was a dup in jde-util and jde-open-source but not used
  anywhere so removed

- jde-normalize-paths not used so removed

- moved jde-find-class-source-file jde-find-class-source to jde-open-source

- jde-find-class-source-file: fix to avoid (stringp nil) errors when
  `jde-parse-class-exists' returns nil

- removed `save-selected-window' (RMS) Emacs 21.1 and 21.2 fix as we drop
  support for 21


git-svn-id: https://jdee.svn.sourceforge.net/svnroot/jdee/branches/2.4.0/jde@139 381a1f10-3442-0410-997e-ef331cd04102
  • Loading branch information
paullandes committed Sep 8, 2009
1 parent fafe291 commit 67dd489
Show file tree
Hide file tree
Showing 24 changed files with 1,540 additions and 679 deletions.
37 changes: 30 additions & 7 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,37 @@
unless="lisp.uptodate">
<!-- copy the lisp to the build directory -->
<copy todir="${build.lisp.dir}">
<fileset dir="${src.lisp.dir}" includes="*.el"/>
<fileset dir="${src.lisp.dir}">
<include name="*.el"/>
<exclude name=".dir-locals.el"/>
</fileset>
</copy>

<exec outputproperty="build.lisp.is-xemacs"
executable="${build.bin.emacs}" failonerror="true">
<arg value="--no-site-file"/>
<arg value="--batch"/>
<arg value="--eval"/>
<arg value="(message &quot;%S&quot; (if (featurep 'xemacs) 'true 'false))"/>
</exec>
<if>
<equals arg1="${build.lisp.is-xemacs}" arg2="true"/>
<then>
<copy todir="${build.lisp.dir}">
<fileset dir="${src.xelisp.dir}">
<include name="*.el"/>
<exclude name=".dir-locals.el"/>
</fileset>
</copy>
</then>
</if>

<!-- make windows paths "mixed" dos paths (cygwin term) -->
<mixed-path property="cedet.escaped.dir" value="${cedet.dir}"/>
<mixed-path property="elib.escaped.dir" value="${elib.dir}"/>
<mixed-path property="src.lisp.escaped.dir" value="${src.lisp.dir}"/>
<mixed-path property="build.lisp.escaped.dir" value="${build.lisp.dir}"/>
<mixed-path property="build.lisp.dst.escaped.file" value="${build.lisp.dst.file}"/>

<!-- create the file used to compile the emacs lisp code -->
<copy file="${build.lisp.src.file}" tofile="${build.lisp.dst.file}"/>
Expand All @@ -120,15 +143,11 @@

<target name="build-lisp" depends="configure-ebuild" unless="lisp.uptodate"
description="compile the JDEE Emacs lisp code">
<!-- invoke Emacs in batch mode to creat autoloads and compile emacs lisp
<!-- invoke Emacs in batch mode to create autoloads and compile emacs lisp
-->
<!-- here we set os=unix since otherwise the exec complains about the
directory not existing -->
<mixed-path property="build.lisp.escaped.dir" value="${build.lisp.dir}"/>
<mixed-path property="build.lisp.dst.escaped.file" value="${build.lisp.dst.file}"/>

<exec dir="${build.lisp.escaped.dir}"
executable="${build.bin.emacs}" failonerror="true">
<arg value="--no-site-file"/>
<arg value="--batch"/>
<arg value="--load"/>
<arg value="${build.lisp.dst.escaped.file}"/>
Expand Down Expand Up @@ -199,6 +218,10 @@
</copy>
</target>

<target name="warnings" depends="build-lisp">
<antcall target="clean"/>
</target>

<target name="clean" depends="init"
description="delete all derived objects EXCEPT the user edited configuration file">
<delete dir="${build.dir}"/>
Expand Down
1 change: 1 addition & 0 deletions config/project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# source code
src.lisp.dir=${project.dir}/lisp
src.xelisp.dir=${project.dir}/xelisp
src.java.dir=${project.dir}/java/src

# third party libraries
Expand Down
51 changes: 51 additions & 0 deletions doc/history/release-notes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,57 @@
<author>Przemystaw Wojnowski</author>
<msg>Support for 1.5 generics and simplified for loops in jde-complete</msg>
</change>

<change commiter="lentrig">
<author>TODO: look up in the logs who made these contributed these patches</author>
<msg>More 1.5 and 1.6 support.</msg>
</change>

<change commiter="paullandes">
<author>Paul Landes</author>
<msg>jde-parse-get-buffer-class is now interactive and also returns class names sans packages.</msg>
</change>

<change commiter="paullandes">
<author>Paul Landes</author>
<msg>New addition of class driven bookmarks (jde-bookmark.el).</msg>
</change>

<change commiter="paullandes">
<author>Paul Landes</author>
<msg>More fontification (i.e. constructors).</msg>
</change>

<change commiter="paullandes">
<author>Paul Landes</author>
<msg>Beanshell can optionally display a separate buffer for errors based on customized variable `jde-bsh-separate-buffer'.</msg>
</change>

<change commiter="paullandes">
<author>Paul Landes</author>
<msg>New function `jde-parse-class-name' parses class name into package name parts so we don't have to pass around fully qualified type flags to functions that need this--i.e. source finding functions.</msg>
</change>

<change commiter="paullandes">
<author>Paul Landes</author>
<msg>New function `jde-read-class' provides better user input class finding.</msg>
</change>

<change commiter="paullandes">
<author>Paul Landes</author>
<msg>New function `jde-exception-goto' provides a way to go to a file and line number from an exception stack trace line..</msg>
</change>

<change commiter="paullandes">
<author>Paul Landes</author>
<msg>More robust jde-eval, which now doesn't get confused with extraneous show() output. This feature can be turned off..</msg>
</change>

<change commiter="paullandes">
<author>Paul Landes</author>
<msg>More parsing ability (i.e. reverse camel notation parsing, which replaces some key bindings, convert from reverse camel notation to other variable formats like SQL, Java properties, hungarian notation, C constants, etc. parse Beanshell/Java expressions).</msg>
</change>

</release>

<!--
Expand Down
86 changes: 53 additions & 33 deletions lisp/beanshell.el
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@

(require 'eieio)
(require 'comint)
(require 'lmenu)

(defgroup bsh nil
"Customizations for the Emacs inteface to Pat Neimeyer's Java
Expand Down Expand Up @@ -151,6 +152,9 @@ buffer."
:group 'bsh
:type 'directory)

(defvar bsh-the-bsh nil
"The BeanShell instance associated with the current BeanShell buffer.")
(make-variable-buffer-local 'bsh-the-bsh)

(defclass bsh-buffer ()
((buffer-name :initarg :buffer-name
Expand Down Expand Up @@ -203,7 +207,7 @@ buffer."
(defmethod bsh-comint-buffer-exec ((this bsh-comint-buffer) vm vm-args)
(let ((win32-start-process-show-window t)
(w32-start-process-show-window t)
(w32-quote-process-args ?\") ;; Emacs
(w32-quote-process-args ?\") ;; Emacs
(win32-quote-process-args ?\") ;; XEmacs
(windowed-process-io t)
(process-connection-type nil)
Expand All @@ -216,7 +220,13 @@ buffer."

(oset this process (get-buffer-process (oref this buffer)))
(oset this filter (process-filter (oref this process)))
(process-kill-without-query (oref this process))

;; moved to `process-query-on-exit-flag' per compile warning hint:
;; `process-kill-without-query' is an obsolete function (as of Emacs 22.1);
;; use `process-query-on-exit-flag' or `set-process-query-on-exit-flag'.
;;
;;(process-kill-without-query (oref this process))
(set-process-query-on-exit-flag (oref this process) nil)

(if (eq system-type 'windows-nt)
(accept-process-output (oref this process) bsh-startup-timeout 0)
Expand Down Expand Up @@ -250,15 +260,15 @@ buffer."

(defmethod bsh-compilation-buffer-set-mode ((this bsh-compilation-buffer))
"Define buffer mode."
(let ((thisdir default-directory))
(let ((thisdir default-directory))
(with-current-buffer (oref this buffer)
(let ((buf (oref this buffer))
;; Some or all of these variables may not be defined by
;; the various versions of compile.el shipped with Emacs
;; and XEmacs.
(error-regexp-alist
(if (boundp 'compilation-error-regexp-alist)
compilation-error-regexp-alist))
compilation-error-regexp-alist))
(enter-regexp-alist
(if (boundp 'compilation-enter-directory-regexp-alist)
compilation-enter-directory-regexp-alist))
Expand All @@ -276,8 +286,8 @@ buffer."
compilation-parse-errors-function))
(error-message "No further errors"))

;; In case the compilation buffer is current, make sure we get the global
;; values of compilation-error-regexp-alist, etc.
;; In case the compilation buffer is current, make sure we get the
;; global values of compilation-error-regexp-alist, etc.
(kill-all-local-variables)

;; Clear out the compilation buffer and make it writable.
Expand All @@ -289,24 +299,28 @@ buffer."
(compilation-mode)
(setq buffer-read-only nil)

(set (make-local-variable 'compilation-parse-errors-function) parser)
(set (make-local-variable 'compilation-error-message) error-message)
(if (boundp 'compilation-parse-errors-function)
(set (make-local-variable 'compilation-parse-errors-function) parser))
(if (boundp 'compilation-error-message)
(set (make-local-variable 'compilation-error-message) error-message))
(set (make-local-variable 'compilation-error-regexp-alist)
error-regexp-alist)

(if (not (featurep 'xemacs))
(progn
(set (make-local-variable 'compilation-enter-directory-regexp-alist)
enter-regexp-alist)
(set (make-local-variable 'compilation-leave-directory-regexp-alist)
leave-regexp-alist)
(set (make-local-variable 'compilation-file-regexp-alist)
file-regexp-alist)
(set (make-local-variable 'compilation-nomessage-regexp-alist)
nomessage-regexp-alist)))
(when (not (featurep 'xemacs))
(dolist (elt `((compilation-enter-directory-regexp-alist
,enter-regexp-alist)
(compilation-leave-directory-regexp-alist
,leave-regexp-alist)
(compilation-file-regexp-alist
,file-regexp-alist)
(compilation-nomessage-regexp-alist
,nomessage-regexp-alist)))
(if (boundp (car elt))
(set (make-local-variable (car elt)) (second elt)))))

(setq default-directory thisdir)
(setq compilation-directory-stack (list default-directory))))))
(if (boundp 'compilation-directory-stack)
(setq compilation-directory-stack (list default-directory)))))))

(defmethod bsh-compilation-buffer-filter ((this bsh-compilation-buffer) proc string)
"This filter prints out the result of the process without buffering.
Expand Down Expand Up @@ -394,7 +408,6 @@ The result is inserted as it comes in the compilation buffer."
:documentation
"Lisp output from the BeanShell.")


(vm :initarg :vm
:initform "java"
:type string
Expand Down Expand Up @@ -428,7 +441,13 @@ The result is inserted as it comes in the compilation buffer."
:initform "bsh.Interpreter"
:type string
:documentation
"Name of BeanShell class."))
"Name of BeanShell class.")

(separate-error-buffer :initarg :separate-error-buffer
:initform nil
:type boolean
:documentation
"Whether or not to use a separate error buffer."))
"Defines an instance of a BeanShell process.")

(defmethod initialize-instance ((this bsh) &rest fields)
Expand Down Expand Up @@ -493,7 +512,6 @@ to the string form required by the vm."
(if (bsh-running-p this)
(oref (oref this buffer) process)))


(defmethod bsh-launch ((this bsh) &optional display-buffer)

(assert
Expand Down Expand Up @@ -549,11 +567,6 @@ to the string form required by the vm."
(message "The BeanShell is already running.")
(bsh-buffer-display (oref this buffer)))))

(defvar bsh-the-bsh nil
"The BeanShell instance associated with the current BeanShell buffer.")
(make-variable-buffer-local 'bsh-the-bsh)


(defmethod bsh-snag-lisp-output ((this bsh) process output)
"Assemble Lisp OUTPUT from the BeanShell."
(let ((end-of-output (string-match ".*bsh % " output)))
Expand All @@ -574,13 +587,21 @@ to the string form required by the vm."

(defmethod bsh-detect-java-eval-error ((this bsh) bsh-output)
(if (string-match "// Error:" bsh-output)
(progn
(if (oref this separate-error-buffer)
(save-excursion
(set-buffer (get-buffer-create "*Beanshell Error*"))
(erase-buffer)
(insert (format "Expression: %s" (oref this java-expr)))
(newline)
(insert (format "Error: %s" bsh-output))
(goto-char (point-min))
(display-buffer (current-buffer))
(error "Beanshell eval error."))
(message
"Beanshell expression evaluation error.\n Expression: %s\n Error: %s"
(oref this java-expr) bsh-output)
(error "Beanshell eval error. See messages buffer for details."))))


(defmethod bsh-eval-lisp-output ((this bsh))
(if (not (string= (oref this lisp-output) ""))
(flet ((format-error-msg (error-symbols)
Expand Down Expand Up @@ -856,8 +877,7 @@ directory cannot be found. If XEmacs, returns the location of
the data directory in the XEmacs distribution hierarchy. On all other Emacs versions,
the bsh expects to find the documentation
in the same directory that contains the bsh.el file."
(let ((directory-sep-char ?/)
dir)
(let (dir)
(flet ((find-data-dir
()
(expand-file-name
Expand Down Expand Up @@ -904,8 +924,7 @@ in the same directory that contains the bsh.el file."
(file-exists-p bsh-help))
(browse-url (concat "file://" bsh-help)
(if (boundp 'browse-url-new-window-flag)
'browse-url-new-window-flag
browse-url-new-window-p))
browse-url-new-window-flag))
(signal 'error '("Cannot find BeanShell help file.")))))

(defcustom bsh-script-menu-definition
Expand All @@ -931,6 +950,7 @@ in the same directory that contains the bsh.el file."
"Insert BeanShell script menu in the XEmacs menu bar."
(if (and
(not (featurep 'infodock))
(boundp 'c-emacs-features)
(not (memq 'infodock c-emacs-features))
(boundp 'current-menubar)
current-menubar)
Expand Down
Loading

0 comments on commit 67dd489

Please sign in to comment.