Hi Tomas,
I'm getting an issue with using the above method like so:
StyleSpans<Collection<String>> styleSpans = codeArea.getStyleSpans(startIndex, startIndex + text.length());
StyleSpansBuilder<Collection<String>> spansBuilder = new StyleSpansBuilder<>();
spansBuilder.add(Collections.singleton("class1"), text.length());
spansBuilder.add(Collections.singleton("class2"), text.length());
spansBuilder.create().forEach(styleSpans::append);
After this code executes, styleSpans still has a length of 0. If it was unmodifiable I'd assume it would've thrown an exception, but I believe that is not the case.
Is there anything I'm doing wrong?
Thank you.
Hi Tomas,
I'm getting an issue with using the above method like so:
After this code executes, styleSpans still has a length of 0. If it was unmodifiable I'd assume it would've thrown an exception, but I believe that is not the case.
Is there anything I'm doing wrong?
Thank you.