Add a Framework Dependency

Last modified by Kieran Kelleher on 2009/11/25 21:51

Most projects have dependencies on additional frameworks such as Project Wonder. This short tutorial will show you how to include those frameworks in your WOLips project.

1. In the 'WO Explorer' sub-view, select the project icon and right-click on it, select "Properties", go to the "Java Build Path" and then select the "Libraries" tab. Alternatively, one can click on the disclosure triangle next to the project to open it, then select the 'Referenced Libraries' icon under the project and right-click on it.

Frameworks-01.png

Alternative Approach For Linking Custom Frameworks

For any custom frameworks that you have access to you can alternatively add project dependencies in the Projects tab when configuring your build path. The advantage of this approach is that you don't have to build/install your framework after each change when testing locally. If you happen to both add your framework as a framework dependency as outlined in this tutorial as well as adding its project as a project dependency, then ensure that the project dependency comes first in the Order and Export tab.


2. Click on the "Add Library..." button. The resulting dialog allows you to select which frameworks will be linked into your project. Note frameworks are shown to be in "System", "Local", or "Project" locations.

Frameworks-02.png


3. If you look at the "Local" frameworks (all of the entries in your /Library/Frameworks folder), you can select "ERExtensions" and "ERJars" from the list and click "Finish". Why not grab the "Ajax" framework while you at it! By default, the "Local" entries will be found in your /Library/Frameworks folder. If you want to change this value (for example, to /Users/<yourName>/Roots), you can do so by editing the "~/Library/Application Support/WOLips/wolips.properties" file and set the "wo.local.frameworks" value to the new location. Note that you can also set either the wo.user.frameworks "User Location", wo.system.frameworks, or wo.network.frameworks "Network Location" values and WOLips will make any of these available.

Note

Project Wonder frameworks like ERExtensions, ERJars, and Ajax won't be available for selection if you've not yet installed them. Should you wish to install Project Wonder, see here for various topics on Project Wonder, including installation.

By the way, what does this actually do? Well, this procedure changes the the contents of the file named ".classpath" used by the WOLips incremental builder. This procedure also changes the files in the "woproject" directory that ant depends on for building the project. If you use a version control system such as Subversion you will see this when you next commit updates to the repository or compare current working copy to repository.


4. That's it! WOLips will automatically rebuild your project to reflect the new dependencies, update the mock .xcodeproj files (for integration with WOBuilder), and all of your code completions will now include completions for elements in the included frameworks.

5. It's time to Deploy a WO Application!