diff --git a/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF b/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF index 73b6266936..2bd99eb302 100644 --- a/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF +++ b/apitools/org.eclipse.pde.api.tools/META-INF/MANIFEST.MF @@ -33,8 +33,7 @@ Export-Package: org.eclipse.pde.api.tools.internal;x-friends:="org.eclipse.pde.a org.eclipse.pde.api.tools.internal.search;x-friends:="org.eclipse.pde.api.tools.tests,org.eclipse.pde.api.tools.ui", org.eclipse.pde.api.tools.internal.util;x-friends:="org.eclipse.pde.api.tools.tests,org.eclipse.pde.api.tools.ui,org.eclipse.pde.api.tools.generator" Bundle-RequiredExecutionEnvironment: JavaSE-17 -Import-Package: com.ibm.icu.util, - org.objectweb.asm;version="[9.5.0,10.0.0)", +Import-Package: org.objectweb.asm;version="[9.5.0,10.0.0)", org.objectweb.asm.signature;version="[9.5.0,10.0.0)", org.objectweb.asm.tree;version="[9.5.0,10.0.0)" Bundle-Activator: org.eclipse.pde.api.tools.internal.provisional.ApiPlugin diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/HTMLConvertor.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/HTMLConvertor.java index 1fb0cacc57..85bf23ee13 100644 --- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/HTMLConvertor.java +++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/search/HTMLConvertor.java @@ -13,7 +13,8 @@ *******************************************************************************/ package org.eclipse.pde.api.tools.internal.search; -import com.ibm.icu.util.ULocale; +import java.util.Locale; +import java.util.Set; /** * Contains strings and methods for writing HTML markup @@ -77,7 +78,8 @@ public abstract class HTMLConvertor { /** * Opening html tag: <html> */ - public static final String OPEN_HTML = !ULocale.getDefault().isRightToLeft() ? "\n" : "\n";//$NON-NLS-1$ //$NON-NLS-2$ + public static final String OPEN_HTML = !isRightToLeft() ? "\n" //$NON-NLS-1$ + : "\n";//$NON-NLS-1$ /** * Closing html tag: <html> */ @@ -163,6 +165,28 @@ public abstract class HTMLConvertor { */ public static final String OPEN_H4 = "

"; //$NON-NLS-1$ + private static final Set RTL_LANGUAGES = Set.of( // + "ae", /* Avestan */ //$NON-NLS-1$ + "ar", /* "العربية", Arabic */ //$NON-NLS-1$ + "arc", /* Aramaic */ //$NON-NLS-1$ + "bcc", /* "بلوچی مکرانی", Southern Balochi */ //$NON-NLS-1$ + "bqi", /* "بختياري", Bakthiari */ //$NON-NLS-1$ + "ckb", /* "Soranî / کوردی", Sorani */ //$NON-NLS-1$ + "dv", /* Dhivehi */ //$NON-NLS-1$ + "fa", /* "فارسی", Persian */ //$NON-NLS-1$ + "glk", /* "گیلکی", Gilaki */ //$NON-NLS-1$ + "he", /* "עברית", Hebrew */ //$NON-NLS-1$ + "ku", /* "Kurdî / كوردی", Kurdish */ //$NON-NLS-1$ + "mzn", /* "مازِرونی", Mazanderani */ //$NON-NLS-1$ + "nqo", /* N"Ko */ //$NON-NLS-1$ + "pnb", /* "پنجابی", Western Punjabi */ //$NON-NLS-1$ + "ps", /* "پښتو", Pashto, */ //$NON-NLS-1$ + "sd", /* "سنڌي", Sindhi */ //$NON-NLS-1$ + "ug", /* "Uyghurche / ئۇيغۇرچە", Uyghur */ //$NON-NLS-1$ + "ur", /* "اردو", Urdu */ //$NON-NLS-1$ + "yi" /* "ייִדיש", Yiddish */ //$NON-NLS-1$ + ); + /** * Opens a new <td> with the given width attribute set * @@ -173,4 +197,8 @@ public static String openTD(int width) { buffer.append(""); //$NON-NLS-1$//$NON-NLS-2$ return buffer.toString(); } + + private static boolean isRightToLeft() { + return RTL_LANGUAGES.contains(Locale.getDefault().getLanguage()); + } }