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:
java.io.Closeable,java.lang.AutoCloseable,java.lang.Readable
public class AtlCodeReader extends SingleCharReader
Reads from a document either forwards or backwards. May be configured to skip comments and strings.
-
-
Field Summary
Fields Modifier and Type Field Description static intEOF
-
Constructor Summary
Constructors Constructor Description AtlCodeReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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)intgetOffset()Returns the offset of the last read character.intread()-
Methods inherited from class org.eclipse.m2m.atl.adt.ui.corext.doc.SingleCharReader
getString, read, ready
-
-
-
-
Field Detail
-
EOF
public static final int EOF
- See Also:
- Constant Field Values
-
-
Method Detail
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein classjava.io.Reader- Throws:
java.io.IOException- See Also:
Reader.close()
-
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
public int read() throws java.io.IOException- Overrides:
readin classjava.io.Reader- Throws:
java.io.IOException
-
-