----- Original Message -----
From: "Molitor, Stephen" <[EMAIL PROTECTED]>
To: "'Philip Miller'" <[EMAIL PROTECTED]>; "Paul Kinnucan"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, May 21, 2001 9:41 AM
Subject: RE: configurable paths in project files


> I would also be interested in more information on the JDE's
architecture --
> perhaps a "JDE Developer's Guide" or something.  I would also like to
write
> some ehancements, and I know some elisp, but I'm in the dark on how JDE
> interacts with semantic, the bean shell, etc.  I know, check the source!
> But any other pointers would be appreciated.
>

Hi Stephen,

Here are some pointers.

* Check with me before starting implementation of a feature or bug fix. All
too often people fail to do this and end up reinventing the wheel.

* Read the Developer's Corner page on the JDE website.

* The JDE is basically a subclass of Emacs java-mode that adds a menu of
commands. jde.el implements the JDE menu and subclassing of java-mode. The
other Lisp files in the JDE distribution mainly implement the commands on
the JDE menu.

* Some of the JDE commands are implemented in Java. The JDE uses the
Beanshell to run the Java code via the Lisp function bsh-eval-r, which
evaluates a Java expression, e.g.,
jde.utili.JdeUtilities.getQualifiedClass("JFrame") evaluates the result,
which is assumed to be a Lisp expression returned by the Java code via
standard out. In other words, bsh-eval-r is the primary interface between
the JDE Lisp and Java code.

* The JDE uses semantic to parse the content of a Java source buffer. JDE
commands use the parse tree generated by semantic to get information about
the classes, packages, methods, fields, etc, defined in the buffer. See the
semantic documentation for more information.

* The JDE uses defcustom exclusively to define user options.

* I prefer that developers use Eric Ludlam's eieo package, which provides an
object system for Emacs lisp, and  object-oriented programming techniques to
implement new JDE features. In particular, if you see an opportunity for
reuse for some piece of code that you are writing, implement it as a class.
For example, I just updated the interface wizard to accept unqualified class
names. To do this, I needed to create code that prompts the user to select
from one of several intefaces of the same (unqualified) name. I realized
that there are lots of places in the JDE that need a capability to prompt
the user to select from a set of options. So I created a class named
jde-option-dialog (inherited from jde-dialog) that prompts the user to
select from a set of options and then passes the selected option to the
function specified by its ok-action field. From now on, whenever there is
need to prompt the user to select an option, all you have to write is

(defun do-foo-option (option)
  ;; do something based on user-selected option.
)

(let ((dialog
          (jde-option-dialog
             "foo option dialog"
            :options foo-options
            :text "Select foo option:"
            :ok-action 'do-foo-option)))
    (jde-show-dialog dialog))


See the eieio documentation and the numerous examples of class definitions
(defclass) in the JDE for more information.

Hope this helps.

- Paul



Reply via email to