Determining if an offset is in between line numbers?
Posted
by Sophomore
on Stack Overflow
See other posts from Stack Overflow
or by Sophomore
Published on 2010-03-19T12:09:02Z
Indexed on
2010/03/19
12:11 UTC
Read the original article
Hit count: 177
hi
I need to determine if a given selection is in between a start line and an end line.
I have an ILineRange
and a given offset within the viewport of eclipse. (I need to know, if the selection (from a remote party) was made within the current viewport of the local user. Unfortunately, I cannot get an LineRange
from the selection. I must rely on getOffset() and getLength()...
Anyone has an idea?
I think there is not a clean solution for this, as the offset (or the characters per line vary (new line lines or a big block of comment).
© Stack Overflow or respective owner