|
Eclipse Platform 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.text.TextUtilities
Collection of text functions.
Field Summary | |
static String[] |
fgDelimiters
|
Constructor Summary | |
TextUtilities()
|
Method Summary | |
static String |
determineLineDelimiter(String text,
String hint)
Determines which one of fgDelimiters appears first in the list. |
static int |
endsWith(String[] searchStrings,
String text)
Returns the longest search string with which the given text ends. |
static int |
equals(String[] compareStrings,
String text)
Returns whether the text equals one of the given compare strings. |
static int[] |
indexOf(String[] searchStrings,
String text,
int offset)
Returns the position in the string greater than offset of the longest matching search string. |
static DocumentEvent |
mergeProcessedDocumentEvents(List documentEvents)
Returns a document event which is an accumulation of a list of document events, null if the list of document events is empty. |
static DocumentEvent |
mergeUnprocessedDocumentEvents(IDocument unprocessedDocument,
List documentEvents)
Returns a document event which is an accumulation of a list of document events, null if the list of documentEvents is empty. |
static int |
startsWith(String[] searchStrings,
String text)
Returns the longest search string with which the given text starts. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String[] fgDelimiters
Constructor Detail |
public TextUtilities()
Method Detail |
public static String determineLineDelimiter(String text, String hint)
public static int[] indexOf(String[] searchStrings, String text, int offset)
public static int endsWith(String[] searchStrings, String text)
public static int startsWith(String[] searchStrings, String text)
public static int equals(String[] compareStrings, String text)
public static DocumentEvent mergeUnprocessedDocumentEvents(IDocument unprocessedDocument, List documentEvents) throws BadLocationException
null
if the list of documentEvents is empty.
The document of the document events are ignored.
unprocessedDocument
- the document to which the document events would be applieddocumentEvents
- the list of document events to merge
BadLocationException
- might be thrown if document is not in the correct state with respect to document eventspublic static DocumentEvent mergeProcessedDocumentEvents(List documentEvents) throws BadLocationException
null
if the list of document events is empty.
The document events being merged must all refer to the same document, to which
the document changes have been already applied.
documentEvents
- the list of document events to merge
BadLocationException
- might be thrown if document is not in the correct state with respect to document events
|
Eclipse Platform 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |