Private Sub SaveTextLineByLine(ViewName As View)
Dim Source As Reflector
Source.Target=ViewName
Dim Text As String=Source.RunMethod2("getText",Null,"java.lang.string")
Dim Layout As Reflector=Source.RunMethod("getLayout")
Dim LineCount As Int=Source.RunMethod2("getLineCount",Null,"java.lang.int")
Dim TextByLine(LineCount) As String
Dim LineStart,LineEnd As Int
Dim R As Reflector
R.Target = Layout
Dim A As Int
For A=0 To LineCount - 1
LineStart=R.RunMethod2("getLineStart",A,"java.lang.int")
LineEnd=R.RunMethod2("getLineEnd",A,"java.lang.int")
TextByLine(A)=Text.SubString2(LineStart,LineEnd).Trim
Next
End Sub