Re: IdeaScript v.0.1 (Prototype Release)

This is a great plugin idea. Two things:

1/ I would like to make a script to implement a kind of multiple
inheritance, ie:
I have interfaces I1, I2, etc, with concrete implementations C1, C2, etc.
I want to create a class that "extends" C1, C2... so I declare it that way:

class A implements I1, I2
private I1 itsInnerI1 = new C1 ();
private I2 itsInnerI2 = new C2 ();

And for each method declaration of each interface, I define a similar method
in class A:

void m1I1 ()
itsInnerI1.m1I1 ();

int m2I1 ()
return itsInnerI1.m2I1 ();

So I would like to be able to make a script that:
-Checks the cursor is in an implement's interface declaration ("implements
I|1, I2")
-Generate the field declarations if not already declared.
-Remove all previously generated methods for this interface (they could be
identified by a javadoc tag)
-Generate all the methods.

Is it a feasible thing? How could I do that?

2/ When I launch Idea #915 with ScriptPlugin installed, I get the following
exception. It doesn't seem to otherwise affect the operation of the plugin.
at com.intellij.openapi.diagnostic.Logger.error(
at com.intellij.openapi.components.a.a.getComponent(
at com.digimax.idea.script.IdeaScript.]]>(
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
at java.lang.reflect.Constructor.newInstance(
at com.intellij.openapi.application.b.d.c(
at com.intellij.openapi.components.a.a.a(
at com.intellij.openapi.components.a.a.k(
at com.intellij.openapi.components.a.a.i(
at com.intellij.openapi.application.b.d.a(
at com.intellij.idea.e.b(
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEvent(

Kirk Woll wrote:

IdeaScript is an Ant-like scripting language for Idea. It allows you to
easily create scripts to codify repetitive tasks in our favorite IDE. The
architecture is easily extendable so you can quickly create commands to
make your scripts do whatever you want (or more precisely, whatever Idea's
Open-API will let you).

Using IdeaScript, you can:

  • Create classes, methods, fields, etc.

  • Navigate to files, classes, or members within classes

  • Move the cursor anywhere around the editor and

edit the contents of the editor (cut, copy, paste,

  • Other miscellaneous commands

This plugin is probably not for everyone but I already find it useful so I
thought I'd share what I have so far. This is the first public release and
as such I hope to elicit developer comments and criticism. Where I am
most interested in feedback is the currently chosen element names for the
commands and the names of their properties. (Since changing these down
the line will break people's scripts.) Also, I'd like to hear suggestions
on commands that aren't present yet but that you would find useful.

IdeaScript is available at:

Please read that page completely so you don't miss anything. A short
tutorial is also available from that page.

Please sign in to leave a comment.