How To Setup Your Projects for HFCD
Howdy, some developers are having difficulties setting up their Flex Builder projects to use HFCD. I hope to address this by producing more documentation in the coming weeks. In the meantime, I hope to use the following example to explain how to setup your projects for HFCD. It should be pretty straightforward…
This example uses one of the IBM ILOG Elixir samples, heatmap.
1. Assume that you have ILOG Elixir installed (e.g.
/Applications/IBM/ILOG/Elixir 2.5). In Flex Builder, import “Existing Projects into Workspace”. Select
/Applications/IBM/ILOG/Elixir 2.5/samples/heatmap. Check “Copy projects into workspace”.
2. Once the project is loaded, you should see in the HFCD console window that the heatmap project files are being ‘uploaded’ to HFCD.
[Thu Oct 22 12:40:12 EDT 2009] upload() count=2 total=541 time=1 [Thu Oct 22 12:40:12 EDT 2009] upload() count=74 total=1624755 time=66
Also, check out the project properties. Please take a look at ‘Flex Build Path’. You should see ilog-elixir.swc and ilog-elixir_rb.swc in the library path.
3. The SWC files are in
/Applications/IBM/ILOG/Elixir 2.5/frameworks. But the heatmap project that you’ve just imported is in, e.g. in my case,
/Users/clement/Documents/Flex Builder 3/elixir-sample-heatmap. The SWC files are explicitly specified and are not managed by the Eclipse resource manager. That means, HFCD would not know about them. In fact, any files that the project workspace does not know about would not be “uploaded” to HFCD. To address this issue, you can use the “HFCD FileSet” view.
4. Click ‘Windows’ –> ‘Other Views…’ and you should see the “HFCD FileSet’ view at the bottom. There is a pull-down menu at the top-right corner (that little inverted triangle) of the “HFCD FileSet” view. Click the pull-down menu and select ‘Add Directory’.
/Applications/IBM/ILOG/Elixir 2.5/frameworks to the “HFCD FileSet” view.
6. Go back to the pull-down menu and select “Upload Files”. This step “uploads” the SWC files to HFCD.
[Thu Oct 22 12:45:32 EDT 2009] upload() count=2 total=2486244 time=52 [Thu Oct 22 12:45:32 EDT 2009] upload() count=2 total=16330 time=2 [Thu Oct 22 12:45:32 EDT 2009] upload() count=2 total=14402 time=2 [Thu Oct 22 12:45:32 EDT 2009] upload() count=3 total=0 time=0 [Thu Oct 22 12:45:32 EDT 2009] upload() count=2 total=694230 time=14 [Thu Oct 22 12:45:32 EDT 2009] upload() count=4 total=0 time=0
The “HFCD FileSet” view will then show the number of files being “uploaded”.
Behind the scene, the files in
/Users/clement/Flex Builder 3/elixir-sample-heatmap and
/Applications/IBM/ILOG/Elixir 2.5/frameworks are copied to
/Users/clement/.hfcd/files. It is where HFCD locates and compiles the files.
7. At this point, HFCD should have all the files it needs to compile heatmap. Now, start a new, clean build.
8. If there is nothing wrong, the heatmap app will be compiled successfully and you should see it in the “HFCD View” view.
9. Test the app by selecting ‘heatmap.html’ in the ‘bin-debug’ directory.
Hope you find this useful. Also, this previous post (http://stopcoding.wordpress.com/2009/10/09/using-flex-builder-with-hfcd) talks about the very same topic. Please check it out.