@Override public synchronized void insertUpdate(DocumentEvent e) { if (inSync) return ; inSync = true; region.sync(0); getHighlightsBag(doc).setHighlights(bag); inSync = false; target.repaint(); }
@Override public synchronized void removeUpdate(DocumentEvent e) { if (inSync) return ; //#89997: do not sync the regions for the "remove" part of replace selection, //as the consequent insert may use incorrect offset, and the regions will be synced //after the insert anyway. if (doc.getProperty(BaseKit.DOC_REPLACE_SELECTION_PROPERTY) != null) { return ; } inSync = true; region.sync(0); getHighlightsBag(doc).setHighlights(bag); inSync = false; target.repaint(); }
getHighlightsBag(doc).setHighlights(bag);
getHighlightsBag(doc).setHighlights(tempBag); } else { getHighlightsBag(doc).setHighlights(newBag); getHighlightsBag(doc).setHighlights(newBag);
getHighlightsBag(doc).setHighlights(obag); OccurrencesMarkProvider.get(doc).setOccurrences( OccurrencesMarkProvider.createMarks(doc, out, ES_COLOR, NbBundle.getMessage(MarkOccurrencesHighlighter.class, "LBL_ES_TOOLTIP")));