From: Jason Alexander <jalex@ls...> - 2002-09-16 15:44:35
Just in case it might be of interest to anyone else, I've posted a short
web page describing an enhanced JConsole at
http://evolve.lse.ac.uk/jalex/misc/JCellConsole. The source code is
available there for download as well.
JCellConsole provides a simple cell-based interface to BeanShell.
Unlike the standard JConsole, each "cell" can contain multiple lines of
BeanShell code (including an arbitrary number of empty lines). Tabs can
be used to indent to make the cells easier to read. A cell is evaluated
by typing Shift+Enter, at which point the contents of the shell are
grabbed up, shipped off to the interpreter, with the output printed
A cell can be edited and reevaluated, in which case the new output
replaces the previous output.
Any printed messages from the interpreter appear in a message pane below
the cell editor.
JCellConsole currently does not support saving/loading of sessions. I
would love to be able to do this, but I just don't know enough about how
to work with Java's document model to implement this. (It should be
pretty easy to do so: the entire thing is built on top of a standard
JTextComponent with the appearance of cells controlled by styles, and
the formatting done by setLogicalStyle applied to entire paragraphs.)
Any thoughts, comments, suggestions, etc. would be appreciated.
J. McKenzie Alexander
Department of Philosophy, Logic and Scientific Method
London School of Economics and Political Science
Houghton Street, London WC2A 2AE