in my plug in after performing search, each matches are sent to acceptsearchmatch(searchmatch) function as objects of searchmatch.I want to get the line numbers where the match happened.cant use getoffset because it gives relative to source buffer.how can i get the line number?help
thanks
The trick is: a
SearchMatchgive you aSearchRange, meaning several lines can potentially be included in that Range.The solution is to parse the Document associated to the object returned by the SearchMatch in order to compute those line numbers.
The relevant method is
getLineOfOffset(int offset)You have here an example, in the case where the object is a
IMember