|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.eclipse.jface.text.FindReplaceDocumentAdapter
Provides search and replace operations on
IDocument.
Replaces
IDocument.search(int, String, boolean, boolean, boolean).
| Constructor Summary | |
|---|---|
FindReplaceDocumentAdapter(IDocument document)
Constructs a new find replace document adapter. |
|
| Method Summary | |
|---|---|
char |
charAt(int index)
|
IRegion |
find(int startOffset,
String findString,
boolean forwardSearch,
boolean caseSensitive,
boolean wholeWord,
boolean regExSearch)
Returns the location of a given string in this adapter's document based on a set of search criteria. |
int |
length()
|
IRegion |
replace(String text,
boolean regExReplace)
Substitutes the previous match with the given text. |
CharSequence |
subSequence(int start,
int end)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public FindReplaceDocumentAdapter(IDocument document)
document - the adapted document| Method Detail |
public IRegion find(int startOffset,
String findString,
boolean forwardSearch,
boolean caseSensitive,
boolean wholeWord,
boolean regExSearch)
throws BadLocationException
startOffset - document offset at which search startsfindString - the string to findforwardSearch - the search directioncaseSensitive - indicates whether lower and upper case should be distinguishedwholeWord - indicates whether the findString should be limited by white spaces as
defined by Character.isWhiteSpace. Must not be used in combination with regExSearch.regExSearch - if true findString represents a regular expression
Must not be used in combination with wholeWord.
null if there was no match
BadLocationException - if startOffset is an invalid document offset
PatternSyntaxException - if a regular expression has invalid syntax
public IRegion replace(String text,
boolean regExReplace)
throws BadLocationException
DocumentEvent to all registered IDocumentListener.
text - the substitution textregExReplace - if true text represents a regular expression
null if there was no match
BadLocationException - if startOffset is an invalid document offset
IllegalStateException - if a REPLACE or REPLACE_FIND operation is not preceded by a successful FIND operation
PatternSyntaxException - if a regular expression has invalid syntaxDocumentEvent,
IDocumentListenerpublic int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequence
public CharSequence subSequence(int start,
int end)
subSequence in interface CharSequencepublic String toString()
toString in interface CharSequence
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.