1022 BeanShell Box Languages 48 e-manation 4 8044 melix 2006-09-22 0.2

BeanShell Box

Compatible with  IntelliJ IDEA
8 044
Adds a BeanShell toolbox allowing you to write snippets of both Java and BeanShell code. See http://www.beanshell.org for a complete description of the BeanShell language.

Download plugin

Is there a way to use this plugin to write kind of Intellij macros ? I see nowhere how to access Intellij functionalities, editor content, ...
Generally, it is a very useful plugin. However, it deadlocks the current MAIA EAP (10652) at startup :(

2.0b4 - by Pat Niemeyer (pat@pat.net)
bsh % p = new JPanel();

... Internal IDE error ...

loader constraint violation: loader (instance of bsh/classpath/BshClassLoader) previously initiated loading for a different type with name "javax/accessibility/AccessibleContext"
java.lang.LinkageError: loader constraint violation: loader (instance of bsh/classpath/BshClassLoader) previously initiated loading for a different type with name "javax/accessibility/AccessibleContext"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at bsh.classpath.BshClassLoader.findClass(Unknown Source)
at bsh.classpath.BshClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructors(Class.java:1459)
at bsh.Reflect.constructObject(Unknown Source)
at bsh.BSHAllocationExpression.constructObject(Unknown Source)
at bsh.BSHAllocationExpression.objectAllocation(Unknown Source)
at bsh.BSHAllocationExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown Source)
at bsh.BSHAssignment.eval(Unknown Source)
at bsh.Interpreter.run(Unknown Source)
at java.lang.Thread.run(Thread.java:619)
I has the same problem as thuss, and I had a ton of memory allocated to idea (512M). Fundamentally this plugin completely breaks Idea for projects of a moderate to large size. I recommend removing the plugin until this problem is fixed - it's too dangerous for many users.

Have you tried increasing the maximum amount of memory IJ uses ? (idea.vm file).
Similar experience to thuss. Installed BeanShell project after which my medium size project (over 1000 classes) wouldn't load (IDEA hang). Removed plugin files and all was well (didn't try it with a small project).
I installed this plugin on Idea 6.0.2 on OS X and then tried to open our largish multi-module project and Idea just hung indefinitely. I had to kill it then manually remove the:

/Library/Application Support/IntelliJIDEA60/ BeanShellBox

directory. However, with a small test project it works fine!
I've installed the BeanShell Plugin and restarted Intellij. How do I access/start BeanShell?
BeanShell is 100% Java-compatible. Just do it like a regular import :

import my.package.MyClass;
give me a tip to import class would be better

It does load classes from the output directory. Though, you still have to import them manually. I have not used the auto-import feature of BeanShell because it leads to many name conflicts. Therefore, a classical build and test scheme would be :

- build
- refresh BeanShell (clears imports)
- import your class in BeanShell (import my.package.MyClass;)
- test your snippet

I've planned to try to auto import classes when you use the "Send to" feature, but I still have to figure out how to do it ;)
Doesn't this plugin also load class files from the build output directories of the project? It would be useful to autoload those directories.
very good.
Please  sign in  to leave a comment.