}
HighlightsContainer bh = HighlightingManager.getInstance(pane).getBottomHighlights();
// HighlightsContainer th = HighlightingManager.getInstance(pane).getTopHighlights();
HighlightsSequence bhs = bh.getHighlights(start, end);
// HighlightsSequence ths = th.getHighlights(start, end);
// default_bcolor = pane.getBackground();
int token_end_prev = -2;
StringBuilder rtfContent = new StringBuilder("");
while (bhs.moveNext()) {
try {
int token_start = bhs.getStartOffset();
int token_end = bhs.getEndOffset();
String token = pane.getText(token_start, token_end - token_start);
if (token_start > token_end_prev && token_end_prev >= 0) {
String token_miss = pane.getText(token_end_prev, token_start-token_end_prev);
processToken(token_miss, null, rtfContent);
}
processToken(token, bhs.getAttributes(), rtfContent);
token_end_prev = token_end;
} catch (BadLocationException ex) {
Exceptions.printStackTrace(ex);
}
}