Package org.eclipse.text.readers
Class SubstitutionReader
java.lang.Object
java.io.Reader
org.eclipse.text.readers.SingleCharacterReader
org.eclipse.text.readers.SubstitutionReader
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Readable
Reads the text contents from a reader and computes for each character
 a potential substitution. The substitution may eat more characters than
 only the one passed into the computation routine.
 
 Moved into this package from org.eclipse.jface.internal.text.revisions.
- Since:
- 3.14
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()protected abstract StringcomputeSubstitution(int c) Computes the substitution for the given character and if necessary subsequent characters.protected ReaderReturns the internal reader.protected final booleanprotected intnextChar()Returns the next character.intread()booleanready()voidreset()protected final voidsetSkipWhitespace(boolean state) Methods inherited from class org.eclipse.text.readers.SingleCharacterReadergetString, readMethods inherited from class java.io.Readermark, markSupported, nullReader, read, read, skip, transferTo
- 
Field Details- 
LINE_DELIM
- 
fWasWhiteSpaceprotected boolean fWasWhiteSpace
 
- 
- 
Constructor Details- 
SubstitutionReader
 
- 
- 
Method Details- 
computeSubstitutionComputes the substitution for the given character and if necessary subsequent characters. Implementation should usenextCharto read subsequent characters.- Parameters:
- c- the character to be substituted
- Returns:
- the substitution for c
- Throws:
- IOException- in case computing the substitution fails
 
- 
getReaderReturns the internal reader.- Returns:
- the internal reader
 
- 
nextCharReturns the next character.- Returns:
- the next character
- Throws:
- IOException- in case reading the character fails
 
- 
read- Specified by:
- readin class- SingleCharacterReader
- Throws:
- IOException
- See Also:
 
- 
ready- Overrides:
- readyin class- SingleCharacterReader
- Throws:
- IOException
- See Also:
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein class- Reader
- Throws:
- IOException
- See Also:
 
- 
reset- Overrides:
- resetin class- Reader
- Throws:
- IOException
- See Also:
 
- 
setSkipWhitespaceprotected final void setSkipWhitespace(boolean state) 
- 
isSkippingWhitespaceprotected final boolean isSkippingWhitespace()
 
-