Skip to content

Rescripter

January 3, 2012

Accidentally bounced on this particular tool and found interesting.

If you want to refactor / add comments / alter the existing code, this tool is very useful.

You need to have Eclipse IDE and one can install the plugin from https://raw.github.com/activelylazy/Rescripter/master/update-site/target/site

It is based on Javascript and one can make wonders…..

 

Simple Sample (Java Code)

public class RescripterTest {

}

The rescripter code

var type = Find.typeByName(“RescripterTest”);
edit = new SourceChange(type.getCompilationUnit());
edit.addImport(“java.util.Date”);
edit.apply();

Now the result is

import java.util.Date;

public class RescripterTest {

}

Need to see the broader usage of this tool.

To know more about this tool, please visit https://github.com/activelylazy/Rescripter/blob/master/documentation/tutorial.md

 

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: