Christian Mercat <[EMAIL PROTECTED]> writes:
> > > http://www.entrelacs.net/home/Java/beanInfoMaker.html
> > > http://www.entrelacs.net/home/Java/beanInfoMaker.bsh
> > >
> > > I have no idea how to make it work from within JDE,
> >
> > Put the beanInfoMaker.bsh script in the
> > jde/java/bsh-commands/bsh/commands/ directory. Start the BeanShell
> > (M-x bsh) and enter the beanInfoMaker command at the BeanShell command
> > line in the BeanShell, e.g.,
> >
> > % beanInfoMaker("mybeans.MyBean");
> >
> > The ability to easily write and run Java scripts from within
> > Emacs is one of the more little known and appreciated features of the
> > JDEE.
>
> ...
> I don't know how to make a wizard out of this script, that is get the
> buffer name MyClass.java, create a new buffer name MyClassBeanInfo.java
> and yank the result of the script into it. Without having to type
> anything in the bsh, like a proper wizard should do. That's what I
> meant.
Ok, quick `n dirty:
(defun jde-gen-beaninfo (classname)
"Generate a beaninfo class for the given full qualified classname."
(interactive "sEnter classname: ")
(let ((class (concat classname ".class"))
(filename (jde-open-get-java-file-name (concat classname "BeanInfo"))))
(find-file filename)
(jde-gen-call-bsh (concat "beanInfoMaker(" class ")"))))
(defun jde-gen-call-bsh (command)
"call `command' in the beanshell and insert result at point."
(interactive "sCommand: ")
(insert (jde-jeval (concat "print(" command ");") nil)))
put this in your .emacs or wherever, then type "M-x jde-gen-beaninfo".
Ole
--
Ole Arndt http://www.cegedim-deutschland.de
-------------------------------------------------------
Living on Earth may be expensive, but it includes an annual free trip
around the Sun.