We use Eclipse for development and testing of our tools. SetupSet up Eclipse as described on the ICU Site. Set up Subversion also, since you'll need it soon. PreferencesGo to Preferences (under Eclipse on Mac, under Window on others) - Java>Installed JREs
- Pick 1.6.0
- Edit...
- Default
VM arguments: (change red to your
specific path)
- -Dfile.encoding=UTF-8
-Xmx1300M
-DSHOW_FILES -DSHOW -DCLDR_DIR=/Users/markdavis/Documents/workspace35/cldr/ -DCLDR_UTIL_DATA=/Users/markdavis/Documents/workspace/cldr/tools/java/org/unicode/cldr/util/data/
For now, following settings are suggested. (These settings should be done in the CLDR tool's eclipse project file) - General>Workspace: Text File Encoding: UTF-8
- General>Editors>Text Editors:
- Displayed Tab width: 4
- Insert spaces for tabs
- Show line numbers (optional)
- Java>Code Style>Formatter:
- Edit...
- Profile Name: CLDR
- Indentation Tab
- Tab policy: Spaces Only
- Indentation size: 4
- Tab size: 4
- Align fields in columns
- Line Wrapping Tab
- Maximum line width: 160
- Never Join Lines ✓
Also, you need to set up user libraries as follows - Java>Build Path>User Libraries
- Click "New" to add following libraries
- Ant
- Specify "ANT_LIB" as the user library name
- Get ant libraries from http://ant.apache.org/bindownload.cgi. Extract the contents to local directory
- Click "Add JARs..." and specify the location of "ant.jar"
- ICU
- Specify "ICU_UTILITIES" as the user library name
- Build icu4j.jar and utilities.jar in ICU (ICU ant target "icu4jJar" and "cldrUtil to build these two jar files)
- Click "Add JARs..." and specify the location of above two jar files
- Note: if you want to modify ICU4J files at the same time, you may import a bunch of ICU4J projects from the ICU repository. In this case, you may need to update cldr-tools project to include these icu4j-*** projects in the build path.
Test- Find unittest/TestAll
- Right-click, run as... Java Application.
- When it fails, chose Run Configurations, then retitle that TestAll as TestAll - cldr. In Arguments, add -n -u.
- Hit run.
- Note that lost of stuff fails, because we haven't cleaned up the tests yet, but this is a good check as to whether the tools compile.
- Go to ConsoleCheckCLDR. Run As... Java Application
- You'll get lots of warnings and errors.
- On my machine, this takes about 5 minutes to run.
Survey Tool |
|