Revision 77 in Subversion has two new features that have been requested over on the forums. The first, and most interesting one to me at least, is bookmarking. RTextScrollPane now has methods to toggle whether “bookmarking” is enabled. When it is, an icon appears beside a bookmarked line. You can quickly skip to the next and previous bookmarks in a file with F2 and Shift+F2, respectively. Ctrl+F2 toggles a bookmark on the current line.
Those little blue icons in the margin are the bookmarks. You can change this icon to whatever you like; it’s just a Swing Icon.
Further, this icon margin can be used to display arbitrary icons for any line in a source file. This can be used to mark anything, such as debugging breakpoints or compile errors:
I will be putting up a demo soon showing off this icon margin, along with all the other cool new features getting added to the next RSTA release.
The other feature added is line highlighting. RSTA now includes a small API to set the background color for individual lines. One example use of this feature is if you use RSyntaxTextArea in a file diffing tool, and wish to show modified, added and removed lines in various colors.