On 6/27/2020 7:51 AM, Tim Boudreau wrote:
...A handy library for that (and in general working with coalescing intersecting ranges of coordinates - I used it in a memory manager for a virtual filesystem as well) is here: https://github.com/timboudreau/util/tree/master/range - maven central coordinates are com.mastfrog:range:2.6.11.
For ranges how about google's RangeSet, guava https://github.com/google/guava/wiki/NewCollectionTypesExplained#rangeset, and related?BTW, ranges are in both versions of guava that NB's used, 15 and 27.
Prompted by this discussion, I went back and took a look at some old highlight stuff I've got. I'm exploring using RangeSet to implement a "rangeInBagValid". So that I don't need to compute the highlights for the entire document and only need to compute the highlights once for any given region. Normally, there are very few ranges; typically a single range gets extended, and a new range created when you jump around the file.
-ernie --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
