Package org.eclipse.m2m.atl.adt.ui.text
Class AtlCodeReader
java.lang.Object
java.io.Reader
org.eclipse.m2m.atl.adt.ui.corext.doc.SingleCharReader
org.eclipse.m2m.atl.adt.ui.text.AtlCodeReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
Reads from a document either forwards or backwards. May be configured to skip comments and strings.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconfigureBackwardReader(org.eclipse.jface.text.IDocument document, int offset, boolean skipComments, boolean skipStrings) voidconfigureForwardReader(org.eclipse.jface.text.IDocument document, int offset, int length, boolean skipComments, boolean skipStrings) intReturns the offset of the last read character.intread()Methods inherited from class org.eclipse.m2m.atl.adt.ui.corext.doc.SingleCharReader
getString, read, readyMethods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, reset, skip, transferTo
-
Field Details
-
EOF
public static final int EOF- See Also:
-
-
Constructor Details
-
AtlCodeReader
public AtlCodeReader()
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException- See Also:
-
configureBackwardReader
public void configureBackwardReader(org.eclipse.jface.text.IDocument document, int offset, boolean skipComments, boolean skipStrings) -
configureForwardReader
public void configureForwardReader(org.eclipse.jface.text.IDocument document, int offset, int length, boolean skipComments, boolean skipStrings) -
getOffset
public int getOffset()Returns the offset of the last read character. Should only be called after read has been called. -
read
- Overrides:
readin classReader- Throws:
IOException
-