Plugin Development

"DosBox" <[email protected]> Tue, 24 Oct 2017 06:32:04 +0000
Newsgroups gmane.comp.java.netbeans.devel
Message-ID <[email protected]>
Hi all,

I am trying to create a NetBeans plugin and I need to somehow find out the range of lines currently visible in the editor.

Example: let say a opened file has 100 lines, editor displays 20 lines, scroll position is in the middle. I would like to find such functions that used like this:


Code:
int start = XXX.getVisibleLinesStart();
int end   = XXX.getVisibleLinesEnd();



should return:


Code:
start = 40;
end   = 60;



Is this possible to achieve with NetBeans API? Which component holds the information about document view? Where to look?
I found out that it does not have to be lines, the first and last visible character would do.