Skip to main content

A brother to a coyote

Posted by claudio on May 3, 2006 at 10:30 PM PDT

A while back NetBeans made available coyote project to enable developers write code in dynamic languages. Actually it supports Groovy and Jython. But it doesn't supports BeanShell which I am a fan, specially because of the interactive shell console.

The shell console let's you type code and execute it when the 'enter' key is pressed, so it's a shell console. (ok I know someone will remember me of Groovy console, but the different point is the beanshell console is interactive, groovy console is not). There is an old module for netbeans, but it doesn't enable the shell console and runs beanshell 1.2b5, the actual version is 2.0b4

To use the BeanShell shell console, it was launched from command-line. So I though "this can be a topcomponent of netbeans...", then I developed this small module to launch the shell console inside netbeans, easy.

The module development costs me more time to believe it was so easy, than to the development itself. It took more time to discover some beanshell internals. As I knew that, I just created a Module Suite, a Library Wrapper and WindowComponent, all of them wizards from NetBeans Module Development support.

So I tell you, if you want any jcomponent as part of netbeans workspace, so you are lucky, just use the WindowComponent Wizard, and type this at the constructor:

add(new MyJComponent());

So I won't bother you anymore, take a look at the screenshot:

View larger image

Actually the module is very simple, just the shell console.

Known issues:

  • only one window can be opened
  • the same window is reused, no matter if the actual is closed

and download the modules:

br-com-claudius-netbeans-bsh.nbm NetBeans Module

bsh.nbm (BeanShell Library Wrapper)

Any comment is welcome and thank you for the interest.

Related Topics >>