diff --git a/.gitattributes b/.gitattributes index 36212006a3..00262ef156 100644 --- a/.gitattributes +++ b/.gitattributes @@ -286,6 +286,8 @@ icu4c/source/tools/pkgdata/pkgdata.vcxproj.filters -text icu4c/source/tools/toolutil/toolutil.vcxproj -text icu4j/build.properties -text icu4j/demos/manifest.stub -text +icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/META-INF/MANIFEST.MF -text +icu4j/eclipse-build/plugins.template/com.ibm.icu/META-INF/MANIFEST.MF -text icu4j/main/classes/charset/.classpath -text icu4j/main/classes/charset/.project -text icu4j/main/classes/charset/.settings/org.eclipse.jdt.core.prefs -text diff --git a/icu4j/eclipse-build/build.properties b/icu4j/eclipse-build/build.properties new file mode 100644 index 0000000000..71f53c83b3 --- /dev/null +++ b/icu4j/eclipse-build/build.properties @@ -0,0 +1,7 @@ +#******************************************************************************* +#* Copyright (C) 2010, International Business Machines Corporation and * +#* others. All Rights Reserved. * +#******************************************************************************* +icu4j.plugin.impl.version.string=4.5.2 +copyright.eclipse=Licensed Materials - Property of IBM \n (C) Copyright IBM Corp. 2000, 2010. All Rights Reserved. \n IBM is a registered trademark of IBM Corp. +icu4j.data.version.number=45 diff --git a/icu4j/eclipse-build/build.xml b/icu4j/eclipse-build/build.xml new file mode 100644 index 0000000000..87bade9d6c --- /dev/null +++ b/icu4j/eclipse-build/build.xml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/icu4j/eclipse-build/features.template/com.ibm.icu/.project b/icu4j/eclipse-build/features.template/com.ibm.icu/.project new file mode 100644 index 0000000000..d407fa0f07 --- /dev/null +++ b/icu4j/eclipse-build/features.template/com.ibm.icu/.project @@ -0,0 +1,17 @@ + + + com.ibm.icu-feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/icu4j/eclipse-build/features.template/com.ibm.icu/build.properties b/icu4j/eclipse-build/features.template/com.ibm.icu/build.properties new file mode 100644 index 0000000000..e9000a47e5 --- /dev/null +++ b/icu4j/eclipse-build/features.template/com.ibm.icu/build.properties @@ -0,0 +1,20 @@ +############################################################################### +# Copyright (c) 2000, 2008 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +bin.includes =\ +epl-v10.html,\ +eclipse_update_120.jpg,\ +feature.xml,\ +feature.properties,\ +license.html +outputUpdateJars = true + +generate.plugin@com.ibm.icu.source=com.ibm.icu + diff --git a/icu4j/eclipse-build/features.template/com.ibm.icu/feature.xml b/icu4j/eclipse-build/features.template/com.ibm.icu/feature.xml new file mode 100644 index 0000000000..417e65b570 --- /dev/null +++ b/icu4j/eclipse-build/features.template/com.ibm.icu/feature.xml @@ -0,0 +1,33 @@ + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + [Enter License Description here.] + + + + + + + diff --git a/icu4j/eclipse-build/misc/ICUConfig.properties b/icu4j/eclipse-build/misc/ICUConfig.properties new file mode 100644 index 0000000000..9578b78115 --- /dev/null +++ b/icu4j/eclipse-build/misc/ICUConfig.properties @@ -0,0 +1,12 @@ +#****************************************************************************** +# Copyright (C) 2008-2009, International Business Machines Corporation and * +# others. All Rights Reserved. * +#****************************************************************************** +# This is the properties contains ICU runtime configuration for eclispe plug-in +# + +# +# The default TimeZone implementation type used by the ICU TimeZone +# factory method. [ ICU | JDK ] +# +com.ibm.icu.util.TimeZone.DefaultTimeZoneType = JDK diff --git a/icu4j/eclipse-build/misc/about_icu.html b/icu4j/eclipse-build/misc/about_icu.html new file mode 100644 index 0000000000..03aa08eb61 --- /dev/null +++ b/icu4j/eclipse-build/misc/about_icu.html @@ -0,0 +1,54 @@ + + + + +About + + +

About This Content

+ +

April 8, 2010

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + +

Third Party Content

+

The Content includes items that have been sourced from third parties as set out below. If you + did not receive this Content directly from the Eclipse Foundation, the following is provided + for informational purposes only, and you should look to the Redistributor's license for + terms and conditions of use.

+ +

ICU4J 4.2.1.v20100408 plug-in

+ The plug-in includes software ("ICU4J") developed by International Business Machines + Corporation and others. +

+ ICU4J is: +

+ Copyright (c) 1995-2010 International Business Machines Corporation and others
+ All rights reserved. +
+

+ Your use of ICU4J is subject to the terms and conditions of the ICU4J license. A copy of the + license is contained in the file about_files/license.html.

+

+ ICU4J bundles data files imported from the Unicode Character Database and the Locale Data. A copy of the + Unicode Data and Software license is contained in the file about_files/ucdterms.txt.

+

+ The project information including source code, documentations and demo programs are available on + the ICU public web site.

+ + + diff --git a/icu4j/eclipse-build/misc/about_icu_base.html b/icu4j/eclipse-build/misc/about_icu_base.html new file mode 100644 index 0000000000..41839767f5 --- /dev/null +++ b/icu4j/eclipse-build/misc/about_icu_base.html @@ -0,0 +1,51 @@ + + + + +About + + +

About This Content

+ +

April 8, 2010

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise +indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available +at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is +being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was +provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content +and such source code may be obtained at http://www.eclipse.org.

+ + +

Third Party Content

+

The Content includes items that have been sourced from third parties as set out below. If you + did not receive this Content directly from the Eclipse Foundation, the following is provided + for informational purposes only, and you should look to the Redistributor's license for + terms and conditions of use.

+ +

ICU4J 4.2.1.v20100408 base plug-in

+ The plug-in includes software ("ICU4J") developed by International Business Machines + Corporation and others. +

+ ICU4J is: +

+ Copyright (c) 1995-2010 International Business Machines Corporation and others
+ All rights reserved. +
+

+ Your use of ICU4J is subject to the terms and conditions of the ICU4J license. A copy of the + license is contained in the file about_files/license.html.

+

+ The project information including source code, documentations and demo programs are available on + the ICU public web site.

+ + + diff --git a/icu4j/eclipse-build/pdebuild/allElements.xml b/icu4j/eclipse-build/pdebuild/allElements.xml new file mode 100644 index 0000000000..e4d661303b --- /dev/null +++ b/icu4j/eclipse-build/pdebuild/allElements.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4j/eclipse-build/pdebuild/build.properties b/icu4j/eclipse-build/pdebuild/build.properties new file mode 100644 index 0000000000..86f6cf4d7e --- /dev/null +++ b/icu4j/eclipse-build/pdebuild/build.properties @@ -0,0 +1,220 @@ +############################################################################### +# Copyright (c) 2003-2008 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +##################### +# Parameters describing how and where to execute the build. +# Typical users need only update the following properties: +# baseLocation - where things you are building against are installed +# bootclasspath - The base jars to compile against (typicaly rt.jar) +# configs - the list of {os, ws, arch} configurations to build. +# +# Of course any of the settings here can be overridden by spec'ing +# them on the command line (e.g., -DbaseLocation=d:/eclipse + +############# PRODUCT/PACKAGING CONTROL ############# +product=/plugin or feature id/path/to/.product +runPackager=true + +#Set the name of the archive that will result from the product build. +#archiveNamePrefix= + +# The prefix that will be used in the generated archive. +#archivePrefix= +archivePrefix= + +# The location underwhich all of the build output will be collected. +collectingFolder=${archivePrefix} + +# The list of {os, ws, arch} configurations to build. This +# value is a '&' separated list of ',' separate triples. For example, +# configs=win32,win32,x86 & linux,motif,x86 +# By default the value is *,*,* +#configs=win32, win32, x86 & \ +# linux, gtk, ppc &\ +# linux, gtk, x86 & \ +# linux, gtk, x86_64 & \ +# linux, motif, x86 & \ +# solaris, motif, sparc & \ +# solaris, gtk, sparc & \ +# aix, motif, ppc & \ +# hpux, motif, PA_RISC & \ +# macosx, carbon, ppc + +# By default PDE creates one archive (result) per entry listed in the configs property. +# Setting this value to try will cause PDE to only create one output containing all +# artifacts for all the platforms listed in the configs property. +#groupConfigurations=true + +#The format of the archive. By default a zip is created using antZip. +#The list can only contain the configuration for which the desired format is different than zip. +#archivesFormat=win32, win32, x86 - antZip& \ +# linux, gtk, ppc - antZip &\ +# linux, gtk, x86 - antZip& \ +# linux, gtk, x86_64 - antZip& \ +# linux, motif, x86 - antZip& \ +# solaris, motif, sparc - antZip& \ +# solaris, gtk, sparc - antZip& \ +# aix, motif, ppc - antZip& \ +# hpux, motif, PA_RISC - antZip& \ +# macosx, carbon, ppc - antZip + +#Set to true if you want the output to be ready for an update jar (no site.xml generated) +#outputUpdateJars = false + +#Set to true for Jnlp generation +#codebase should be a URL that will be used as the root of all relative URLs in the output. +#generateJnlp=false +#jnlp.codebase= +#jnlp.j2se= +#jnlp.locale= + +#Set to true if you want to sign jars +#signJars=false +#sign.alias= +#sign.keystore= +#sign.storepass= + +#Arguments to send to the zip executable +zipargs= + +#Arguments to send to the tar executable +tarargs= + +#Control the creation of a file containing the version included in each configuration - on by default +#generateVersionsLists=false + +############## BUILD NAMING CONTROL ################ +# The directory into which the build elements are fetched and where +# the build takes place. +buildDirectory=@BUILD_DIR@ + +# Type of build. Used in naming the build output. Typically this value is +# one of I, N, M, S, ... +buildType=@BUILD_TYPE@ + +# ID of the build. Used in naming the build output. +buildId=@BUILD_ID@ + +# Label for the build. Used in naming the build output +buildLabel=${buildType}.${buildId} + +# Timestamp for the build. Used in naming the build output +timestamp=007 + +#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde. +#The value will only be applied to plugin or features indicating build.properties, qualifier = context +#forceContextQualifier= + +#Enable / disable the generation of a suffix for the features that use .qualifier. +#The generated suffix is computed according to the content of the feature +#generateFeatureVersionSuffix=true + +############# BASE CONTROL ############# +# Settings for the base Eclipse components and Java class libraries +# against which you are building. +# Base location for anything the build needs to compile against. For example, +# in most RCP app or a plug-in, the baseLocation should be the location of a previously +# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack. + +base= +#baseLocation=${base}/eclipse +baseLocation=@BASE_LOCATION@ +#Os/Ws/Arch/nl of the eclipse specified by baseLocation +baseos=@BASE_OS@ +basews=@BASE_WS@ +basearch=@BASE_ARCH@ + +#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built +filteredDependencyCheck=false + +#pluginPath is a list of locations in which to find plugins and features. This list is separated by the platform file separator (; or :) +#a location is one of: +#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo +#- a directory that contains a /plugins or /features subdirectory +#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml +#pluginPath= + +skipBase=true +eclipseURL= +eclipseBuildId= +eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip + + +############# MAP FILE CONTROL ################ +# This section defines CVS tags to use when fetching the map files from the repository. +# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml + +skipMaps=true +mapsRepo=:pserver:anonymous@example.com/path/to/repo +mapsRoot=path/to/maps +mapsCheckoutTag=HEAD + +#tagMaps=true +mapsTagTag=v${buildId} + + +############ REPOSITORY CONTROL ############### +# This section defines properties parameterizing the repositories where plugins, fragments +# bundles and features are being obtained from. + +# The tags to use when fetching elements to build. +# By default thebuilder will use whatever is in the maps. +# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the +# overriding value +# For example fetchTag=CVS=HEAD, SVN=v20050101 +# fetchTag=HEAD +skipFetch=true + + +############# JAVA COMPILER OPTIONS ############## +# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE +#bootclasspath=${java.home}/lib/rt.jar + +# specific JRE locations to compile against. These values are used to compile bundles specifying a +# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support +#CDC-1.0/Foundation-1.0= /path/to/rt.jar +#CDC-1.1/Foundation-1.1= +#OSGi/Minimum-1.0= +#OSGi/Minimum-1.1= +#JRE-1.1= +#J2SE-1.2= +#J2SE-1.3= +#J2SE-1.4= +#J2SE-1.5= +#JavaSE-1.6= +#PersonalJava-1.1= +#PersonalJava-1.2= +#CDC-1.0/PersonalBasis-1.0= +#CDC-1.0/PersonalJava-1.0= +#CDC-1.1/PersonalBasis-1.1= +#CDC-1.1/PersonalJava-1.1= + +# Specify the output format of the compiler log when eclipse jdt is used +logExtension=.log + +# Whether or not to include debug info in the output jars +javacDebugInfo=true + +# Whether or not to fail the build if there are compiler errors +javacFailOnError=true + +# Enable or disable verbose mode of the compiler +javacVerbose=true + +# Extra arguments for the compiler. These are specific to the java compiler being used. +compilerArg=-inlineJSR -enableJavadoc -encoding ISO-8859-1 + +# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties +javacSource=1.5 + +# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties. +javacTarget=1.5 + +individualSourceBundles=true diff --git a/icu4j/eclipse-build/pdebuild/customTargets.xml b/icu4j/eclipse-build/pdebuild/customTargets.xml new file mode 100644 index 0000000000..ae4266d683 --- /dev/null +++ b/icu4j/eclipse-build/pdebuild/customTargets.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.classpath b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.classpath new file mode 100644 index 0000000000..751c8f2e50 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.project b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.project new file mode 100644 index 0000000000..b406f25e57 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.project @@ -0,0 +1,28 @@ + + + com.ibm.icu.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.settings/org.eclipse.jdt.core.prefs b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..93763f6170 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,12 @@ +#Thu Dec 14 11:51:01 EST 2006 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.3 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore +org.eclipse.jdt.core.compiler.source=1.3 diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.settings/org.eclipse.jdt.ui.prefs b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..1c69cb6a3c --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,3 @@ +#Thu Dec 14 11:51:01 EST 2006 +eclipse.preferences.version=1 +internal.default.compliance=default diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/META-INF/MANIFEST.MF b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..eed124fc84 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: ICU Test Fragment +Bundle-SymbolicName: com.ibm.icu.tests +Bundle-Version: 1.0.0 +Bundle-Vendor: IBM +Fragment-Host: com.ibm.icu +Bundle-Copyright: @COPYRIGHT@ +Require-Bundle: org.junit +Bundle-RequiredExecutionEnvironment: J2SE-1.3, + CDC-1.0/Foundation-1.0 diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/build.properties b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/build.properties new file mode 100644 index 0000000000..2d0d402649 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/build.properties @@ -0,0 +1,14 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + ./icu4jtests.jar,\ + .classpath,\ + bin/,\ + build.properties,\ + .project +src.includes = src/,\ + build.properties,\ + .classpath,\ + .project,\ + META-INF/ diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/src/com/ibm/icu/tests/UnitTest.java b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/src/com/ibm/icu/tests/UnitTest.java new file mode 100644 index 0000000000..cc2871ab87 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/src/com/ibm/icu/tests/UnitTest.java @@ -0,0 +1,159 @@ +/* + ****************************************************************************** + * Copyright (C) 2005-2008, International Business Machines Corporation and * + * others. All Rights Reserved. * + ****************************************************************************** + */ +package com.ibm.icu.tests; + +import junit.framework.TestCase; +import com.ibm.icu.dev.test.TestAll; +import com.ibm.icu.dev.test.TestFmwk; +import com.ibm.icu.dev.test.TestFmwk.TestParams; + +//import com.ibm.icu.text.DateFormat; +//import com.ibm.icu.util.Calendar; +//import com.ibm.icu.util.GregorianCalendar; +//import com.ibm.icu.util.TimeZone; +//import com.ibm.icu.util.ULocale; + +public class UnitTest extends TestCase { + + public void testBidi() throws Exception { + runUtility("Bidi"); + } + + public void testCalendar() throws Exception { + runUtility("Calendar"); + } + + public void testCollator() throws Exception { + runUtility("Collator"); + } + + public void testCompression() throws Exception { + runUtility("Compression"); + } + + public void testDuration() throws Exception { + runUtility("Duration"); + } + + public void testDiagBigDecimal() throws Exception { + runUtility("DiagBigDecimal"); + } + + public void testFormat() throws Exception { + runUtility("Format"); + } + + public void testImpl() throws Exception { + runUtility("Impl"); + } + + public void testNormalizer() throws Exception { + runUtility("Normalizer"); + } + + public void testProperty() throws Exception { + runUtility("Property"); + } + + public void testRBBI() throws Exception { + runUtility("RBBI"); + } + + public void testSearchTest() throws Exception { + runUtility("SearchTest"); + } + + public void testStringPrep() throws Exception { + runUtility("StringPrep"); + } + + public void testTestCharsetDetector() throws Exception { + runUtility("TestCharsetDetector"); + } + + public void testTestUCharacterIterator() throws Exception { + runUtility("TestUCharacterIterator"); + } + + public void testTimeScale() throws Exception { + runUtility("TimeScale"); + } + + public void testTimeZone() throws Exception { + runUtility("TimeZone"); + } + + public void testTranslit() throws Exception { + runUtility("Translit"); + } + + public void testUtil() throws Exception { + runUtility("Util"); + } + + public void runUtility(String testname) throws Exception { + TestParams params = TestParams.create("-n", null); + TestFmwk test = new TestAll(); + test.resolveTarget(params, testname).run(); + if (params.errorCount > 0) { + fail(params.errorSummary.toString()); + } + } + + // sample tests from ICU4J test suite + + // Calendar +// public void testCalendarSimple() throws Exception { +// TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); +// GregorianCalendar gc = new GregorianCalendar(tz); +// gc.set(2005,9,17,14,15,33); +// Date time = gc.getTime(); +// +// final String[] calendars = { +// "buddhist", "chinese", "coptic", "ethiopic", "gregorian", +// "hebrew", "islamic", "islamic-civil", "japanese" +// }; +// final String[] ustimes = { +// "Monday, October 17, 2548 BE 2:15:33 PM PDT", +// "Monday 22x78-9-15 2:15:33 PM PDT", +// "Monday, Baba 7, 1722 2:15:33 PM PDT", +// "Monday, Tekemt 7, 1998 2:15:33 PM PDT", +// "Monday, October 17, 2005 2:15:33 PM PDT", +// "Monday, Tishri 14, 5766 2:15:33 PM PDT", +// "Monday, Ramadan 14, 1426 2:15:33 PM PDT", +// "Monday, Ramadan 14, 1426 2:15:33 PM PDT", +// "Monday, October 17, 17 Heisei 2:15:33 PM PDT", +// }; +// final String[] detimes = { +// "Montag, Oktober 17, 2548 BE 2:15:33 nachm. GMT-07:00", +// "Montag 22x78-9-15 2:15:33 nachm. GMT-07:00", +// "Montag, 7. Baba 1722 14:15 Uhr GMT-07:00", +// "Montag, 7. Tekemt 1998 14:15 Uhr GMT-07:00", +// "Montag, 17. Oktober 2005 14:15 Uhr GMT-07:00", +// "Montag, 14. Tishri 5766 14:15 Uhr GMT-07:00", +// "Montag, 14. Ramadan 1426 14:15 Uhr GMT-07:00", +// "Montag, 14. Ramadan 1426 14:15 Uhr GMT-07:00", +// "Montag, Oktober 17, 17 Heisei 2:15:33 nachm. GMT-07:00", +// }; +// +// ULocale[] locales = {ULocale.US, ULocale.GERMANY }; +// String[][] times = { ustimes, detimes }; +// for (int j = 0; j < locales.length; ++j) { +// ULocale ul = new ULocale("en_US"); +// for (int i = 0; i < calendars.length; ++i) { +// ul = ul.setKeywordValue("calendar", calendars[i]); +// Calendar cal = Calendar.getInstance(ul); +// DateFormat fmt = cal.getDateTimeFormat(DateFormat.FULL, DateFormat.FULL, locales[j]); +// String result = fmt.format(time); +// System.out.println(calendars[i] + ": " + result); +// if (!result.equals(times[j][i])) { +// fail("calendar: " + calendars[i]); +// } +// } +// } +// } +} diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu/.classpath b/icu4j/eclipse-build/plugins.template/com.ibm.icu/.classpath new file mode 100644 index 0000000000..751c8f2e50 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu/.project b/icu4j/eclipse-build/plugins.template/com.ibm.icu/.project new file mode 100644 index 0000000000..e73714f9be --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu/.project @@ -0,0 +1,28 @@ + + + com.ibm.icu + + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu/.settings/org.eclipse.jdt.core.prefs b/icu4j/eclipse-build/plugins.template/com.ibm.icu/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..179918e2c5 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,77 @@ +#Mon Aug 30 14:05:56 EDT 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=ignore +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu/.settings/org.eclipse.jdt.ui.prefs b/icu4j/eclipse-build/plugins.template/com.ibm.icu/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..5693f2fd40 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,3 @@ +#Thu Dec 14 11:50:17 EST 2006 +eclipse.preferences.version=1 +internal.default.compliance=default diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu/META-INF/MANIFEST.MF b/icu4j/eclipse-build/plugins.template/com.ibm.icu/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..7aa37bc364 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu/META-INF/MANIFEST.MF @@ -0,0 +1,29 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.ibm.icu; singleton:=true +Bundle-Version: @BUILD_VERSION@ +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-Copyright: @COPYRIGHT@ +Export-Package: com.ibm.icu.lang;base=true;full=true;version="@IMPL_VERSION@", + com.ibm.icu.math;base=true;full=true;version="@IMPL_VERSION@", + com.ibm.icu.text;base=true;full=true;version="@IMPL_VERSION@", + com.ibm.icu.util;base=true;full=true;version="@IMPL_VERSION@", + com.ibm.icu.impl;x-internal:=true, + com.ibm.icu.impl.data;x-internal:=true, + com.ibm.icu.impl.data.icudt@DATA_VERSION_NUMBER@b;x-internal:=true, + com.ibm.icu.impl.data.icudt@DATA_VERSION_NUMBER@b.brkitr;x-internal:=true, + com.ibm.icu.impl.data.icudt@DATA_VERSION_NUMBER@b.coll;x-internal:=true, + com.ibm.icu.impl.data.icudt@DATA_VERSION_NUMBER@b.curr;x-internal:=true, + com.ibm.icu.impl.data.icudt@DATA_VERSION_NUMBER@b.lang;x-internal:=true, + com.ibm.icu.impl.data.icudt@DATA_VERSION_NUMBER@b.rbnf;x-internal:=true, + com.ibm.icu.impl.data.icudt@DATA_VERSION_NUMBER@b.region;x-internal:=true, + com.ibm.icu.impl.data.icudt@DATA_VERSION_NUMBER@b.translit;x-internal:=true, + com.ibm.icu.impl.data.icudt@DATA_VERSION_NUMBER@b.zone;x-internal:=true, + com.ibm.icu.impl.duration;x-internal:=true, + com.ibm.icu.impl.locale;x-internal:=true +Eclipse-LazyStart: true +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-ClassPath: icu-data.jar,. +Eclipse-ExtensibleAPI: true diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu/build.properties b/icu4j/eclipse-build/plugins.template/com.ibm.icu/build.properties new file mode 100644 index 0000000000..8c108f2964 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu/build.properties @@ -0,0 +1,19 @@ +############################################################################### +# Copyright (c) 2000, 2008 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +source.. = src/ +output.. = bin/ +src.includes = about.html,\ + about_files/ +bin.includes = .,\ + about.html,\ + about_files/,\ + plugin.properties,\ + META-INF/ diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu/plugin.properties b/icu4j/eclipse-build/plugins.template/com.ibm.icu/plugin.properties new file mode 100644 index 0000000000..9fe7037be7 --- /dev/null +++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu/plugin.properties @@ -0,0 +1,12 @@ +############################################################################### +# Copyright (c) 2000, 2008 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +pluginName = International Components for Unicode for Java (ICU4J) +providerName = IBM Corporation \ No newline at end of file