/** * Selects and reveals the specified ranges in this text editor. * * @param selectionStart the offset of the selection * @param selectionLength the length of the selection * @param revealStart the offset of the revealed range * @param revealLength the length of the revealed range * @since 3.0 */ protected void selectAndReveal(int selectionStart, int selectionLength, int revealStart, int revealLength) { if (fSourceViewer == null) return; ISelection selection= getSelectionProvider().getSelection(); if (selection instanceof ITextSelection) { ITextSelection textSelection= (ITextSelection) selection; if (textSelection.getOffset() != 0 || textSelection.getLength() != 0) markInNavigationHistory(); } StyledText widget= fSourceViewer.getTextWidget(); widget.setRedraw(false); { adjustHighlightRange(revealStart, revealLength); fSourceViewer.revealRange(revealStart, revealLength); fSourceViewer.setSelectedRange(selectionStart, selectionLength); markInNavigationHistory(); } widget.setRedraw(true); }
/** * Selects and reveals the specified ranges in this text editor. * * @param selectionStart the offset of the selection * @param selectionLength the length of the selection * @param revealStart the offset of the revealed range * @param revealLength the length of the revealed range * @since 3.0 */ protected void selectAndReveal(int selectionStart, int selectionLength, int revealStart, int revealLength) { if (fSourceViewer == null) return; ISelection selection= getSelectionProvider().getSelection(); if (selection instanceof ITextSelection) { ITextSelection textSelection= (ITextSelection) selection; if (textSelection.getOffset() != 0 || textSelection.getLength() != 0) markInNavigationHistory(); } StyledText widget= fSourceViewer.getTextWidget(); widget.setRedraw(false); { adjustHighlightRange(revealStart, revealLength); fSourceViewer.revealRange(revealStart, revealLength); fSourceViewer.setSelectedRange(selectionStart, selectionLength); markInNavigationHistory(); } widget.setRedraw(true); }
/** * Selects and reveals the specified ranges in this text editor. * * @param selectionStart the offset of the selection * @param selectionLength the length of the selection * @param revealStart the offset of the revealed range * @param revealLength the length of the revealed range * @since 3.0 */ protected void selectAndReveal(int selectionStart, int selectionLength, int revealStart, int revealLength) { if (fSourceViewer == null) return; ISelection selection= getSelectionProvider().getSelection(); if (selection instanceof ITextSelection) { ITextSelection textSelection= (ITextSelection) selection; if (textSelection.getOffset() != 0 || textSelection.getLength() != 0) markInNavigationHistory(); } StyledText widget= fSourceViewer.getTextWidget(); widget.setRedraw(false); { adjustHighlightRange(revealStart, revealLength); fSourceViewer.revealRange(revealStart, revealLength); fSourceViewer.setSelectedRange(selectionStart, selectionLength); markInNavigationHistory(); } widget.setRedraw(true); }