/** * Sends out a mark selection changed event to all registered listeners. * * @param offset the offset of the mark selection in the visible document, the offset is <code>-1</code> if the mark was cleared * @param length the length of the mark selection, may be negative if the caret is before the mark. * @since 2.0 */ protected void markChanged(int offset, int length) { if (redraws()) { if (offset != -1) { IRegion r= widgetRange2ModelRange(new Region(offset, length)); offset= r.getOffset(); length= r.getLength(); } ISelection selection= new MarkSelection(getDocument(), offset, length); SelectionChangedEvent event= new SelectionChangedEvent(this, selection); fireSelectionChanged(event); } }
/** * Sends out a mark selection changed event to all registered listeners. * * @param offset the offset of the mark selection in the visible document, the offset is <code>-1</code> if the mark was cleared * @param length the length of the mark selection, may be negative if the caret is before the mark. * @since 2.0 */ protected void markChanged(int offset, int length) { if (redraws()) { if (offset != -1) { IRegion r= widgetRange2ModelRange(new Region(offset, length)); offset= r.getOffset(); length= r.getLength(); } ISelection selection= new MarkSelection(getDocument(), offset, length); SelectionChangedEvent event= new SelectionChangedEvent(this, selection); fireSelectionChanged(event); } }