Friday, October 10, 2008

Light Wolf Plug-in for Eclipse!

I've just released version 0.8.2 of Light Wolf Plug-in for Eclipse. The plugin was tested on Eclipse 3.3 and 3.4. You can download it from here (please follow download instructions), or you can use this update site:

http://lightwolf.sourceforge.net/updates/
Once installed, it will add the option "Add/Remove Light Wolf Nature" to Eclipse's context menu of Java projects. When used, this option tells whether the nature was added or removed. You can check the tab "Builders" in the project properties, and notice that it adds the "Light Wolf Builder" just after the "Java Builder". This means that classes with the @FlowMethod annotation will be automatically enhanced during builds, either full or incremental.

The plugin also comes with the lightwolf.jar library, so you don't need to download it separately. The plugin automatically adds the library to the classpath when the Light Wolf Nature is set for a project, but you can add it separately by using the button "Add Library" in the build path's "Libraries" tab. There will be a library called "Light Wolf Library", which already comes with a source attachment.

Go ahead an try the following snipet:
import org.lightwolf.Flow;
import org.lightwolf.FlowMethod;
public class Test {
@FlowMethod
public static void main(String[] args) throws Throwable {
System.out.println("Before fork.");
int b = Flow.fork(4);
System.out.printf("We are in the branch %d.\n", b);
Flow.merge();
System.out.println("After merge.");
}
}
If your environment was correctly configured, it should print something like this:

Before fork.
We are in the branch 0.
We are in the branch 2.
We are in the branch 1.
We are in the branch 3.
We are in the branch 4.
After merge.


The nexts steps will be improvements on JavaDoc and some new APIs. Please feel free to send me feedback.


No comments: