|
Care should be taken while adding/ deleting/ committing files to the ICU4J repository through CVS interface provided by Eclipse.
Committing edited files
To commit a file to the repository after editing follow the steps below:
-
In the “Package Explorer” view of Java perspective, right click on the project and select Team-> Update. This will update your workspace.
-
Run all the tests again and verify that all tests pass.
-
In the “Package Explorer” view of Java perspective, right click on the project and select Team-> Synchronize with Repository. This view will show all Incoming Changes, Outgoing Changes, and also comes with an integrated diff tool. Double clicking on any file will launch the diff tool.
-
Once the changes made are verified, right click on the file and select “Commit” from the context menu. Enter the message for commit in the following format : “jitterbug <number>: <message>”.
Adding new files
Before checking in a new file into CVS please make sure you perform the following steps:
-
Verify that the file you are trying to add is of extension (*.java,*.txt) and content (Text, binary) known to Eclipse. Select Window -> Preferences, in the screen that is launched expand Team tree in the left column and select “File Content”. Check if the extension is present and contents section identifies the contents correctly.
-
ICU4J uses default Keyword substitution for files. Ensure that the default is turned on for the files you are adding into the repository. Right click on the file/directory select Team from the context menu then select “Change ASCII/Binary Property”. In the dialog box launched select “ASCII with keyword substitution” and from the dropdown menu select “ASCII with keyword expansion
(--kkv)” and let the wizard guide you to finish.
Note: Do not use WinCVS and Eclipse CVS at the simultaneously. This can cause problems since Eclipse maintains a backup database of all changes that you have made. If you do use WinCVS and Eclipse CVS you need to perform refresh ICU4J project by right clicking on the project in “Package Explorer” view of Java perspective and selecting “Refresh”.
Creating a Test Project that Depends on ICU4J
To create a test project that depends on ICU4J, follow the steps given below:
1. Select File > New > Project.
2. In the dialog box that is launched select “Java” in the left pane and “Java Project” in right pane and click “Next.”
Enter project name “test”, uncheck “Use Default” check box and click “Browse” to select a directory where you want the project to be created then click “Next”.

4. Check the “Use source folders contained in the project” radio button. Click on “Create new folder” to create a new folder and set the “Build output folder” as shown below. Then click “Finish”.

5. Verify the settings by right clicking on the project named “test” in “Java” perspective in “Package Explorer” view and selecting properties.
6. Select “Java Build Path” in the left pane and click on the “Projects” tab. Make sure “ICU4J” is on the build path.

7. Select “Project References” in the left pane and check the box to the left of folder named “ICU4J” and click ok.

8. Add a new class to the project. Select the source folder in “Package Explorer” view > right click > New > Class.

9. In the dialog launched, enter data appropriately and click “Finish”.

10. At this point a class named “Test” in package “com.ibm.test” will be created with boiler plate code. Add the following code and try to compile and run it.
packagecom.ibm.test;
importcom.ibm.icu.lang.*;
publicclassTest{
publicstaticvoidmain(String[]args){
System.out.println(UCharacter.isLegal(3));
}
} |