Therefore I raised bug 365133. As I finally was able to post some code I'd like to give a short overview of what can be done.
You need at least Eclipse 3.7 with JSDT tools installed (get them from the Indigo repository).
Import all four projects from the archive to your workspace. Right click one one of them in Package Explorer and select Run As -> Eclipse Application.
The shell consists of a big output pane and an input line at the bottom. Start entering your first JS code there:
i = 2+2;You will see the result right in the output pane. There is a print command available that will dump text to the Console view.
An integrated help is available when hitting the help toolbar button.
will be available as JS function automagically. This way JS functionality can be easily extended while using the benefits of Java.
var myFile = new Packages.java.io.File("~/.bashrc"); print(myFile.exists());
Having a native JS interpreter within Eclipse will provide great new ways to build applications. It might give us macro support, rapid testing facilities for programmers (just load your Plug-in and access it with the Script Shell) and maybe a lot more things I can currently not think of.
If you want to support this idea please vote on bug 365133 or help in finding ways to make this part of Eclipse.