diff --git a/.gitattributes b/.gitattributes
index a9e85580b7a..518d66acbbb 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -226,6 +226,7 @@ icu4j/eclipse-build/plugins.template/com.ibm.icu.base/.settings/org.eclipse.jdt.
icu4j/eclipse-build/plugins.template/com.ibm.icu.base/META-INF/MANIFEST.MF -text
icu4j/eclipse-build/plugins.template/com.ibm.icu.base/build.properties -text
icu4j/eclipse-build/plugins.template/com.ibm.icu.base/plugin.properties -text
+icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/MessagePattern.java -text
icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/META-INF/MANIFEST.MF -text
icu4j/eclipse-build/plugins.template/com.ibm.icu.tests/plugin.properties -text
icu4j/eclipse-build/plugins.template/com.ibm.icu/META-INF/MANIFEST.MF -text
diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/Bidi.java b/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/Bidi.java
index c37d38500c8..a1b57ae9f3f 100644
--- a/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/Bidi.java
+++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/Bidi.java
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 2001-2011, International Business Machines
+* Copyright (C) 2001-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
*/
@@ -2583,4 +2583,99 @@ public class Bidi {
{
throw new UnsupportedOperationException("Method not supported by com.ibm.icu.base");
}
+
+ /**
+ * Get the base direction of the text provided according to the Unicode
+ * Bidirectional Algorithm. The base direction is derived from the first
+ * character in the string with bidirectional character type L, R, or AL.
+ * If the first such character has type L, LTR is returned. If the first
+ * such character has type R or AL, RTL is returned. If the string does
+ * not contain any character of these types, then NEUTRAL is returned.
+ * This is a lightweight function for use when only the base direction is
+ * needed and no further bidi processing of the text is needed.
+ * @param paragraph the text whose paragraph level direction is needed.
+ * @return LTR, RTL, NEUTRAL
+ * @see #LTR
+ * @see #RTL
+ * @see #NEUTRAL
+ * @draft ICU 4.6
+ * @provisional This API might change or be removed in a future release.
+ */
+ public static byte getBaseDirection(CharSequence paragraph) {
+ throw new UnsupportedOperationException("Method not supported by com.ibm.icu.base");
+ }
+
+ /**
+ * Set the context before a call to setPara().
+ *
+ * setPara() computes the left-right directionality for a given piece
+ * of text which is supplied as one of its arguments. Sometimes this piece
+ * of text (the "main text") should be considered in context, because text
+ * appearing before ("prologue") and/or after ("epilogue") the main text
+ * may affect the result of this computation.
+ *
+ * This function specifies the prologue and/or the epilogue for the next
+ * call to setPara(). If successive calls to setPara()
+ * all need specification of a context, setContext() must be called
+ * before each call to setPara(). In other words, a context is not
+ * "remembered" after the following successful call to setPara().
+ *
+ * If a call to setPara() specifies DEFAULT_LTR or
+ * DEFAULT_RTL as paraLevel and is preceded by a call to
+ * setContext() which specifies a prologue, the paragraph level will
+ * be computed taking in consideration the text in the prologue.
+ *
+ * When setPara() is called without a previous call to
+ * setContext, the main text is handled as if preceded and followed
+ * by strong directional characters at the current paragraph level.
+ * Calling setContext() with specification of a prologue will change
+ * this behavior by handling the main text as if preceded by the last
+ * strong character appearing in the prologue, if any.
+ * Calling setContext() with specification of an epilogue will change
+ * the behavior of setPara() by handling the main text as if followed
+ * by the first strong character or digit appearing in the epilogue, if any.
+ *
+ * Note 1: if setContext is called repeatedly without
+ * calling setPara, the earlier calls have no effect,
+ * only the last call will be remembered for the next call to
+ * setPara.
+ *
+ * Note 2: calling setContext(null, null)
+ * cancels any previous setting of non-empty prologue or epilogue.
+ * The next call to setPara() will process no
+ * prologue or epilogue.
+ *
+ * Note 3: users must be aware that even after setting the context
+ * before a call to setPara() to perform e.g. a logical to visual
+ * transformation, the resulting string may not be identical to what it
+ * would have been if all the text, including prologue and epilogue, had
+ * been processed together.
+ * Example (upper case letters represent RTL characters):
+ * prologue = "abc DE"
+ * epilogue = none
+ * main text = "FGH xyz"
+ * paraLevel = LTR
+ * display without prologue = "HGF xyz"
+ * ("HGF" is adjacent to "xyz")
+ * display with prologue = "abc HGFED xyz"
+ * ("HGF" is not adjacent to "xyz")
+ *
+ * @param prologue is the text which precedes the text that
+ * will be specified in a coming call to setPara().
+ * If there is no prologue to consider,
+ * this parameter can be null.
+ *
+ * @param epilogue is the text which follows the text that
+ * will be specified in a coming call to setPara().
+ * If there is no epilogue to consider,
+ * this parameter can be null.
+ *
+ * @see #setPara
+ * @draft ICU 4.8
+ * @provisional This API might change or be removed in a future release.
+ */
+ public void setContext(String prologue, String epilogue) {
+ throw new UnsupportedOperationException("Method not supported by com.ibm.icu.base");
+ }
+
}
diff --git a/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/Collator.java b/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/Collator.java
index 2623e467dba..4f11f1b90fc 100644
--- a/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/Collator.java
+++ b/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/Collator.java
@@ -1,6 +1,6 @@
/**
*******************************************************************************
-* Copyright (C) 1996-2011, International Business Machines Corporation and *
+* Copyright (C) 1996-2012, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@@ -330,6 +330,33 @@ public class Collator implements Comparator