domingo, enero 31, 2010

How to configure Cairnworn Plugin with FlexBuilder 3

The things you will need for this:
- Flex Builder 3
- Cairngorm plugin (from Eclipse update feature)
- Cairngorm templates (http://download.macromedia.com/pub/opensource/cairngorm/plugin/cairngorm2_2_2beta-bin.zip)

1. Installing the Plugin and dependencies

Ok, so the first thing to do after you installed Flex Builder 3 is to configure the plugin, in order to do that you have to add a new remote site to the eclipse update feature (help->software updates->Find and instal...->Search for new features to install)

The url for this is: http://download.macromedia.com/pub/opensource/cairngorm/plugin/

Add it to your known sites and the try to install the package for the plugin, if you get an error for dependencies missing you will need to instal these ones first:

Eclipse JDT Plugin (org.eclipse.jdt.source (eclipse.org))

I dont remember exactly from which source i installed this one, but its very common, google it if you dont find it with the source already installed in eclipse and you will find it.

EMF Common and EMF Code Generation

From Eclipse Modeling Framework (EMF) Updates, the packages are inside EMF SDK 2.5.0 (EMF + XSD), look for something called like EMF Common and EMF Code Generator (not the UI ones).

2. Configuring the plugin

After you succesfully installed the plugin and all the dependencies required, you need to download the Cairngorm templates from here. Extract it on a folder of your choice and then go to window->preference->Cairngorm on Flex Builder 3 and add a new Cairngorm location, this location has to point to the folder where you extracted the zip file (Very important), if you do it wrong, eclipse will warn you.

Once you hava that figured out, what i needed to do was include the file cairngorm.swc (the same that comes with the zip file you downloaded) to the build path of my project, and then right click on the project name and select "Add Cairngorm Project Nature"

3. Ready to run

Now all you have to do is create new Controllers and Commands to your project and everything should work just fine.


Hope this tutorial helps the ones trying to use the plugin, i spent a few hours trying to figure this out, because there is not much documentation from it online. You can leave a comment if you have any questions and i will try to answer it as soon as i can.

For more references, you can go to:

Cairngorm Plugin - Official Page
Another usefull tutorial