public final class StructuredTextProcessor extends Object
package documentation
.
This class can be used without OSGi running (but only the structured text types declared
in StructuredTextTypeHandlerFactory
are available in that mode).
Modifier and Type | Method and Description |
---|---|
static String |
deprocess(String str)
Removes directional formatting characters in the given string.
|
static String |
deprocessTyped(String str,
String textType)
Removes directional formatting characters in the given string.
|
static String |
getDefaultSeparators()
Returns a string containing all the default separator characters to be
used to segment a given string.
|
static String |
process(String str)
Processes the given (lean) text and returns a string with appropriate
directional formatting characters (full text).
|
static String |
process(String str,
String separators)
Processes a string that has a particular semantic meaning to render
it correctly on bidi locales.
|
static String |
processTyped(String str,
String textType)
Processes a string that has a particular semantic meaning to render
it correctly on bidi locales.
|
public static String process(String str)
process(String str, String separators)
with the default
set of separators.
The processing adds directional formatting characters so that presentation using the Unicode Bidirectional Algorithm will provide the expected result. The text is segmented according to the provided separators. Each segment has the Unicode Bidi Algorithm applied to it, but as a whole, the string is oriented left to right.
For example, a file path such as d:\myfolder\FOLDER\MYFILE.java (where capital letters indicate RTL text) should render as d:\myfolder\REDLOF\ELIFYM.java.
str
- the lean text to processdeprocess(String)
public static String process(String str, String separators)
process(String)
.str
- the lean text to processseparators
- characters by which the string will be segmenteddeprocess(String)
public static String processTyped(String str, String textType)
process(String)
.str
- the lean text to process.textType
- an identifier for the structured text handler
appropriate for the type of the text submitted.
It may be one of the identifiers defined in
StructuredTextTypeHandlerFactory
or a type handler identifier
registered by a plug-in.deprocessTyped(java.lang.String, java.lang.String)
public static String deprocess(String str)
str
- string with directional characters to remove (full text).public static String deprocessTyped(String str, String textType)
str
- string with directional characters to remove (full text).textType
- an identifier for the structured text handler
appropriate for the type of the text submitted.
It may be one of the identifiers defined in
StructuredTextTypeHandlerFactory
or a type handler identifier
registered by a plug-in.processTyped(String, String)
public static String getDefaultSeparators()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.