Friday, December 5, 2008

Extracting source code for Flex Builder data visualization components

I always forget the paths to use when extracting the source code for the data visualization components. And since I just upgraded to the 3.2 SDK, I need to re-extract the source again...

This post from the Flex Doc Team tells you how to extract the source, but it suggests that you extract the code to some temp directory. That's fine, but when you select a Class, method, or property in Flex Builder and hit F3 for one of these components, Flex Builder won't be able to find the source and open that file for you automatically.

So let's fix that and put the source where it belongs, with the rest of the SDK! The syntax to extract the source is as follows:

java <jar_file_path> <flex_license_file_dir> <extract_to_path>

Where:

<jar_file_path> is the path to the DMV-source.jar file. This is located in your Flex Builder install directory: <install_dir>/sdks/3.x.x/lib/DMV-source.jar

<flex_license_file_dir> is the path to the dir that has your Flex license file:

  • Windows: C:\Documents and Settings\All Users\Application Data\Adobe\Flex\
  • Mac OS: /Library/Application Support/Adobe/Flex/
  • Linux: ~/.adobe/Flex/

<extract_to_path> is the directory to extract the source code to. For the F3 key to do its thing in Flex Builder, you should specify this as the path to the SDK: <install_dir>/sdks

So on my Mac, I would use this command to extract the source:

java -jar "/Applications/Adobe Flex Builder 3/sdks/3.2.0/lib/DMV-source.jar" "/Library/Application Support/Adobe/Flex/" "/Applications/Adobe Flex Builder 3/sdks/3.2.0"

No comments:

Post a Comment