Class ProjectionViewer
java.lang.Object
org.eclipse.jface.viewers.Viewer
org.eclipse.jface.text.TextViewer
org.eclipse.jface.text.source.SourceViewer
org.eclipse.jface.text.source.projection.ProjectionViewer
- All Implemented Interfaces:
IEditingSupportRegistry,ITextOperationTarget,ITextOperationTargetExtension,ITextViewer,ITextViewerExtension,ITextViewerExtension2,ITextViewerExtension3,ITextViewerExtension4,ITextViewerExtension5,ITextViewerExtension6,ITextViewerExtension7,ITextViewerExtension8,ITextViewerExtension9,IWidgetTokenOwner,IWidgetTokenOwnerExtension,ISourceViewer,ISourceViewerExtension,ISourceViewerExtension2,ISourceViewerExtension3,ISourceViewerExtension4,ISourceViewerExtension5,IInputProvider,IInputSelectionProvider,IPostSelectionProvider,ISelectionProvider
A projection source viewer is a source viewer which supports multiple visible
regions which can dynamically be changed.
A projection source viewer uses a ProjectionDocumentManager
for the management of the visible document.
NOTE: The ProjectionViewer only supports projections that cover full lines.
This class should not be subclassed.
- Since:
- 3.0
- Restriction:
- This class is not intended to be subclassed by clients.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jface.text.source.SourceViewer
SourceViewer.RulerLayoutNested classes/interfaces inherited from class org.eclipse.jface.text.TextViewer
TextViewer.TextHoverKey, TextViewer.WidgetCommandNested classes/interfaces inherited from interface org.eclipse.jface.text.ITextViewerExtension8
ITextViewerExtension8.EnrichMode -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intOperation constant for the collapse operation.static final intOperation constant for the collapse all operation.static final intOperation constant for the expand operation.static final intOperation constant for the expand all operation.static final intOperation constant for the toggle projection operation.Fields inherited from class org.eclipse.jface.text.source.SourceViewer
_SELECTION_POSITION_CATEGORY, fAnnotationHover, fContentAssistant, fContentAssistantInstalled, fContentFormatter, fInformationPresenter, fOverviewRulerAnnotationHover, fPresentationReconciler, fQuickAssistAssistant, fQuickAssistAssistantInstalled, fReconciler, fSelectionCategory, fSelections, fSelectionUpdater, GAP_SIZE, GAP_SIZE_1, MODEL_ANNOTATION_MODELFields inherited from class org.eclipse.jface.text.TextViewer
fAutoIndentStrategies, fDefaultPrefixChars, fDoubleClickStrategies, fEventConsumer, fFindReplaceDocumentAdapter, fHoverControlCreator, fHyperlinkDetectors, fHyperlinkManager, fHyperlinkPresenter, fHyperlinkStateMask, fIgnoreAutoIndent, fIndentChars, fInformationMapping, fLastTopPixel, fMarkPosition, fPaintManager, fPartitioning, fReplaceTextPresentation, fTextHovers, fTextInputListeners, fTextListeners, fTextPresentationListeners, fUndoManager, fViewportListeners, INTERNAL, KEY, MOUSE, MOUSE_END, RESIZE, SCROLLER, SHIFTING, TRACE_ERRORSFields inherited from class org.eclipse.jface.viewers.Viewer
WIDGET_DATA_KEYFields inherited from interface org.eclipse.jface.text.source.ISourceViewer
CONTENTASSIST_CONTEXT_INFORMATION, CONTENTASSIST_PROPOSALS, FORMAT, INFORMATION, QUICK_ASSISTFields inherited from interface org.eclipse.jface.text.ITextOperationTarget
COPY, CUT, DELETE, PASTE, PREFIX, PRINT, REDO, SELECT_ALL, SHIFT_LEFT, SHIFT_RIGHT, STRIP_PREFIX, UNDOFields inherited from interface org.eclipse.jface.text.ITextViewerExtension2
DEFAULT_HOVER_STATE_MASK -
Constructor Summary
ConstructorsConstructorDescriptionProjectionViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler, boolean showsAnnotationOverview, int styles) Creates a new projection source viewer. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProjectionListener(IProjectionListener listener) Adds a projection annotation listener to this viewer.booleancanDoOperation(int operation) Returns whether the operation specified by the given operation code can be performed.computeCollapsedRegion(Position position) Computes the region that must be collapsed when the given position is the position of an expanded projection annotation.computeCollapsedRegionAnchor(Position position) Computes the collapsed region anchor for the given position.protected voidcopyMarkedRegion(boolean delete) Copies/cuts the marked region.protected ISlaveDocumentManagerCreates a new slave document manager.protected IAnnotationModelcreateVisualAnnotationModel(IAnnotationModel annotationModel) Creates the visual annotation model on top of the given annotation model.final voidDisables the projection mode.voiddoOperation(int operation) Performs the operation specified by the operation code on the target.final voidEnables the projection mode.booleanexposeModelRange(IRegion modelRange) Exposes the given model range.protected intfindAndSelect(int startPosition, String findString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord, boolean regExSearch) Adheres to the contract ofIFindReplaceTargetExtension3.findAndSelect(int, String, boolean, boolean, boolean, boolean).protected intfindAndSelectInRange(int startPosition, String findString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord, int rangeOffset, int rangeLength, boolean regExSearch) Adheres to the contract ofIFindReplaceTargetExtension3.findAndSelect(int, String, boolean, boolean, boolean, boolean).protected voidNotifies all registered projection listeners that projection mode has been disabled.protected voidNotifies all registered projection listeners that projection mode has been enabled.IRegion[]getCoveredModelRanges(IRegion modelRange) Returns the maximal subranges of the given model range thus that there is no offset inside a subrange for which there is no image offset.protected FindReplaceDocumentAdapterReturns the find/replace document adapter.Returns the projection annotation model.Returns the current visible region of this viewer's document.protected voidFrees all resources allocated by this viewer.protected voidHandles the verify event issued by the viewer's text widget.protected voidHook method called when the visible document is about to be changed.protected voidHook method called when the visible document has been changed.final booleanReturns whether this viewer is in projection mode.booleanoverlapsWithVisibleRegion(int offset, int length) Returns whether a given range overlaps with the visible region of this viewer's document.protected final voidPosts the request for catch up with the annotation model into the UI thread.protected final voidProcesses the request for catch up with the annotation model in the UI thread.final voidForces this viewer to throw away any old state and to initialize its content from its projection annotation model.voidremoveProjectionListener(IProjectionListener listener) Removes the given listener from this viewer.voidResets the region of this viewer's document which is visible in the presentation.voidsetDocument(IDocument document, IAnnotationModel annotationModel, int modelRangeOffset, int modelRangeLength) Sets the given document as this viewer's text model and the given annotation model as the model for this viewer's visual annotations.voidsetProjectionSummary(org.eclipse.jface.text.source.projection.ProjectionSummary projectionSummary) Sets the projection summary for this viewer.voidsetRangeIndication(int offset, int length, boolean moveCursor) Sets the viewers's range indication to the specified range.protected voidsetVisibleDocument(IDocument document) Sets this viewer's visible document.voidsetVisibleRegion(int start, int length) Defines and sets the region of this viewer's document which will be visible in the presentation.protected booleanupdateSlaveDocument(IDocument slaveDocument, int modelRangeOffset, int modelRangeLength) Updates the given slave document to show the specified range of its master document.protected PointwidgetSelection2ModelSelection(Point widgetSelection) Adapts the behavior of the super class to respect line based folding.Methods inherited from class org.eclipse.jface.text.source.SourceViewer
activatePlugins, addVerticalRulerColumn, clearRememberedSelection, configure, createControl, createFormattingContext, createFormattingContext, createLayout, disposeVisualAnnotationModel, enableOperation, ensureAnnotationHoverManagerInstalled, ensureOverviewHoverManagerInstalled, getAnnotationModel, getContentAssistantFacade, getControl, getCurrentAnnotationHover, getQuickAssistAssistant, getQuickAssistInvocationContext, getRangeIndication, getVerticalRuler, getVisualAnnotationModel, hasCodeMiningProviders, rememberSelection, removeRangeIndication, removeVerticalRulerColumn, restoreSelection, setAnnotationHover, setCodeMiningAnnotationPainter, setCodeMiningProviders, setDocument, setDocument, setDocument, setHoverEnrichMode, setOverviewRulerAnnotationHover, setRangeIndicator, showAnnotations, showAnnotationsOverview, unconfigure, updateCodeMinings, updateSlaveDocumentsMethods inherited from class org.eclipse.jface.text.TextViewer
_getVisibleRegionOffset, _internalGetVisibleRegion, addPainter, addPostSelectionChangedListener, addTextInputListener, addTextListener, addTextPresentationListener, addViewportListener, appendVerifyKeyListener, areMultipleLinesSelected, canPerformFind, changeTextPresentation, createDocumentAdapter, createSlaveDocument, createTextWidget, customizeDocumentCommand, deleteText, disableRedrawing, enabledRedrawing, enabledRedrawing, event2ModelRange, findAndSelect, fireInputDocumentAboutToBeChanged, fireInputDocumentChanged, firePostSelectionChanged, fireSelectionChanged, freeSlaveDocument, getAverageCharWidth, getBottomIndex, getBottomIndexEndOffset, getClosestWidgetLineForModelLine, getCurrentTextHover, getDocument, getDocumentPartitioning, getEmptySelectionChangedEventDelay, getExtent, getFindReplaceTarget, getHoverEventLocation, getInput, getLastKnownSelection, getMark, getModelCoverage, getPaintManager, getRegisteredSupports, getRewriteTarget, getSelectedRange, getSelection, getSelectionProvider, getSlaveDocumentManager, getTextHover, getTextHover, getTextHoveringController, getTextOperationTarget, getTextWidget, getTopIndex, getTopIndexStartOffset, getTopInset, getUndoManager, getVisibleDocument, getVisibleLinesInViewport, getWidthInPixels, getWidthInPixels, ignoreAutoEditStrategies, initializeDocumentInformationMapping, inputChanged, internalRevealRange, invalidateTextPresentation, invalidateTextPresentation, isBlockSelected, isEditable, isIgnoringAutoEditStrategies, isPrintable, markChanged, modelLine2WidgetLine, modelOffset2WidgetOffset, modelRange2ClosestWidgetRange, modelRange2WidgetRange, modelRange2WidgetRange, modelSelection2WidgetSelection, modelStyleRange2WidgetStyleRange, moveFocusToWidgetToken, prependAutoEditStrategy, prependVerifyKeyListener, print, print, redraws, refresh, register, releaseWidgetToken, removeAutoEditStrategy, removePainter, removePostSelectionChangedListener, removeTextHovers, removeTextInputListener, removeTextListener, removeTextPresentationListener, removeVerifyKeyListener, removeViewportListener, requestWidgetToken, requestWidgetToken, resetPlugins, revealRange, selectContentTypePlugin, selectionChanged, setAutoEditStrategies, setAutoIndentStrategy, setDefaultPrefixes, setDocumentPartitioning, setEditable, setEventConsumer, setHoverControlCreator, setHyperlinkDetectors, setHyperlinkPresenter, setIndentPrefixes, setInput, setMark, setRedraw, setRedraw, setSelectedRange, setSelection, setTabsToSpacesConverter, setTextColor, setTextColor, setTextDoubleClickStrategy, setTextHover, setTextHover, setTopIndex, setUndoManager, shift, shift, startSequentialRewriteMode, stopSequentialRewriteMode, unregister, updateTextListeners, updateViewportListeners, updateVisibleDocument, validateSelectionRange, widgetLine2ModelLine, widgetLineOfWidgetOffset, widgetlLine2ModelLine, widgetOffset2ModelOffset, widgetRange2ModelRangeMethods inherited from class org.eclipse.jface.viewers.Viewer
addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, setData, setSelectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.jface.viewers.ISelectionProvider
addSelectionChangedListener, removeSelectionChangedListener, setSelectionMethods inherited from interface org.eclipse.jface.text.ITextViewer
addTextInputListener, addTextListener, addViewportListener, changeTextPresentation, getBottomIndex, getBottomIndexEndOffset, getDocument, getFindReplaceTarget, getSelectedRange, getSelectionProvider, getTextOperationTarget, getTextWidget, getTopIndex, getTopIndexStartOffset, getTopInset, invalidateTextPresentation, isEditable, removeTextInputListener, removeTextListener, removeViewportListener, resetPlugins, revealRange, setAutoIndentStrategy, setDefaultPrefixes, setEditable, setEventConsumer, setIndentPrefixes, setSelectedRange, setTextColor, setTextColor, setTextDoubleClickStrategy, setTextHover, setTopIndex, setUndoManagerMethods inherited from interface org.eclipse.jface.text.ITextViewerExtension3
widgetlLine2ModelLineMethods inherited from interface org.eclipse.jface.text.ITextViewerExtension5
getModelCoverage, modelLine2WidgetLine, modelOffset2WidgetOffset, modelRange2WidgetRange, widgetLine2ModelLine, widgetLineOfWidgetOffset, widgetOffset2ModelOffset, widgetRange2ModelRange
-
Field Details
-
EXPAND
public static final int EXPANDOperation constant for the expand operation.- See Also:
-
COLLAPSE
public static final int COLLAPSEOperation constant for the collapse operation.- See Also:
-
TOGGLE
public static final int TOGGLEOperation constant for the toggle projection operation.- See Also:
-
EXPAND_ALL
public static final int EXPAND_ALLOperation constant for the expand all operation.- See Also:
-
COLLAPSE_ALL
public static final int COLLAPSE_ALLOperation constant for the collapse all operation.- Since:
- 3.2
- See Also:
-
-
Constructor Details
-
ProjectionViewer
public ProjectionViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler, boolean showsAnnotationOverview, int styles) Creates a new projection source viewer.- Parameters:
parent- the SWT parent controlruler- the vertical ruleroverviewRuler- the overview rulershowsAnnotationOverview-trueif the overview ruler should be shownstyles- the SWT style bits
-
-
Method Details
-
setProjectionSummary
public void setProjectionSummary(org.eclipse.jface.text.source.projection.ProjectionSummary projectionSummary) Sets the projection summary for this viewer.- Parameters:
projectionSummary- the projection summary.
-
setDocument
public void setDocument(IDocument document, IAnnotationModel annotationModel, int modelRangeOffset, int modelRangeLength) Description copied from interface:ISourceViewerSets the given document as this viewer's text model and the given annotation model as the model for this viewer's visual annotations. The presentation is accordingly updated whereby only the specified region is exposed. An appropriateTextEventis issued. The text event does not carry a related document event. This method is a convenience method forsetDocument(document, annotationModel);setVisibleRegion(offset, length).- Specified by:
setDocumentin interfaceISourceViewer- Overrides:
setDocumentin classSourceViewer- Parameters:
document- the new input documentannotationModel- the model of the viewer's visual annotationsmodelRangeOffset- the offset of the model rangemodelRangeLength- the length of the model range- See Also:
-
createVisualAnnotationModel
Description copied from class:SourceViewerCreates the visual annotation model on top of the given annotation model.- Overrides:
createVisualAnnotationModelin classSourceViewer- Parameters:
annotationModel- the wrapped annotation model- Returns:
- the visual annotation model on top of the given annotation model
-
getProjectionAnnotationModel
Returns the projection annotation model.- Returns:
- the projection annotation model
-
createSlaveDocumentManager
Description copied from class:TextViewerCreates a new slave document manager. This implementation always returns aChildDocumentManager.- Overrides:
createSlaveDocumentManagerin classTextViewer- Returns:
- ISlaveDocumentManager
-
updateSlaveDocument
protected boolean updateSlaveDocument(IDocument slaveDocument, int modelRangeOffset, int modelRangeLength) throws BadLocationException Description copied from class:TextViewerUpdates the given slave document to show the specified range of its master document.- Overrides:
updateSlaveDocumentin classTextViewer- Parameters:
slaveDocument- the slave documentmodelRangeOffset- the offset of the master document rangemodelRangeLength- the length of the master document range- Returns:
trueif the slave has been adapted successfully- Throws:
BadLocationException- in case the specified range is not valid in the master document
-
addProjectionListener
Adds a projection annotation listener to this viewer. The listener may not benull. If the listener is already registered, this method does not have any effect.- Parameters:
listener- the listener to add
-
removeProjectionListener
Removes the given listener from this viewer. The listener may not benull. If the listener is not registered with this viewer, this method is without effect.- Parameters:
listener- the listener to remove
-
fireProjectionEnabled
protected void fireProjectionEnabled()Notifies all registered projection listeners that projection mode has been enabled. -
fireProjectionDisabled
protected void fireProjectionDisabled()Notifies all registered projection listeners that projection mode has been disabled. -
isProjectionMode
public final boolean isProjectionMode()Returns whether this viewer is in projection mode.- Returns:
trueif this viewer is in projection mode,falseotherwise
-
disableProjection
public final void disableProjection()Disables the projection mode. -
enableProjection
public final void enableProjection()Enables the projection mode. -
setVisibleRegion
public void setVisibleRegion(int start, int length) Description copied from interface:ITextViewerDefines and sets the region of this viewer's document which will be visible in the presentation. Every character inside the specified region is supposed to be visible in the viewer's widget after that call.- Specified by:
setVisibleRegionin interfaceITextViewer- Overrides:
setVisibleRegionin classTextViewer- Parameters:
start- the offset of the visible regionlength- the length of the visible region
-
setVisibleDocument
Description copied from class:TextViewerSets this viewer's visible document. The visible document represents the visible region of the viewer's input document.- Overrides:
setVisibleDocumentin classTextViewer- Parameters:
document- the visible document
-
resetVisibleRegion
public void resetVisibleRegion()Description copied from interface:ITextViewerResets the region of this viewer's document which is visible in the presentation. Afterwards, the whole input document is visible.- Specified by:
resetVisibleRegionin interfaceITextViewer- Overrides:
resetVisibleRegionin classTextViewer
-
getVisibleRegion
Description copied from interface:ITextViewerReturns the current visible region of this viewer's document. The result may differ from the argument passed tosetVisibleRegionif the document has been modified since then. The visible region is supposed to be a consecutive region in viewer's input document and every character inside that region is supposed to visible in the viewer's widget.Viewers implementing
ITextViewerExtension5may be forced to change the fractions of the input document that are shown, in order to fulfill this contract.- Specified by:
getVisibleRegionin interfaceITextViewer- Overrides:
getVisibleRegionin classTextViewer- Returns:
- this viewer's current visible region
-
overlapsWithVisibleRegion
public boolean overlapsWithVisibleRegion(int offset, int length) Description copied from interface:ITextViewerReturns whether a given range overlaps with the visible region of this viewer's document.Viewers implementing
ITextViewerExtension5may be forced to change the fractions of the input document that are shown in order to fulfill this request. This is because the overlap is supposed to be without gaps.- Specified by:
overlapsWithVisibleRegionin interfaceITextViewer- Overrides:
overlapsWithVisibleRegionin classTextViewer- Parameters:
offset- the offsetlength- the length- Returns:
trueif the specified range overlaps with the visible region
-
processCatchupRequest
Processes the request for catch up with the annotation model in the UI thread. If the current thread is not the UI thread or there are pending catch up requests, a new request is posted.- Parameters:
event- the annotation model event
-
postCatchupRequest
Posts the request for catch up with the annotation model into the UI thread.- Parameters:
event- the annotation model event
-
computeCollapsedRegion
Computes the region that must be collapsed when the given position is the position of an expanded projection annotation.- Parameters:
position- the position- Returns:
- the range that must be collapsed
-
computeCollapsedRegionAnchor
Computes the collapsed region anchor for the given position. Assuming that the position is the position of an expanded projection annotation, the anchor is the region that is still visible after the projection annotation has been collapsed.- Parameters:
position- the position- Returns:
- the collapsed region anchor
-
reinitializeProjection
Forces this viewer to throw away any old state and to initialize its content from its projection annotation model.- Throws:
BadLocationException- in case something goes wrong during initialization
-
handleVerifyEvent
Description copied from class:TextViewerHandles the verify event issued by the viewer's text widget.- Overrides:
handleVerifyEventin classTextViewer- Parameters:
e- the verify event- See Also:
-
exposeModelRange
Description copied from interface:ITextViewerExtension5Exposes the given model range. Returns whether this call caused a change of the set of exposed model ranges.- Specified by:
exposeModelRangein interfaceITextViewerExtension5- Parameters:
modelRange- the model range to be exposed- Returns:
trueif the set of exposed model ranges changed,falseotherwise
-
setRangeIndication
public void setRangeIndication(int offset, int length, boolean moveCursor) Description copied from interface:ISourceViewerSets the viewers's range indication to the specified range. It is indicated whether the cursor should also be moved to the beginning of the specified range.- Specified by:
setRangeIndicationin interfaceISourceViewer- Overrides:
setRangeIndicationin classSourceViewer- Parameters:
offset- the offset of the rangelength- the length of the rangemoveCursor- indicates whether the cursor should be moved to the given offset
-
handleDispose
protected void handleDispose()Description copied from class:TextViewerFrees all resources allocated by this viewer. Internally called when the viewer's control has been disposed.- Overrides:
handleDisposein classSourceViewer
-
handleVisibleDocumentChanged
Description copied from class:TextViewerHook method called when the visible document has been changed.Subclasses may override.
- Overrides:
handleVisibleDocumentChangedin classTextViewer- Parameters:
event- the document event
-
handleVisibleDocumentAboutToBeChanged
Description copied from class:TextViewerHook method called when the visible document is about to be changed.Subclasses may override.
- Overrides:
handleVisibleDocumentAboutToBeChangedin classTextViewer- Parameters:
event- the document event
-
getCoveredModelRanges
Description copied from interface:ITextViewerExtension5Returns the maximal subranges of the given model range thus that there is no offset inside a subrange for which there is no image offset.- Specified by:
getCoveredModelRangesin interfaceITextViewerExtension5- Parameters:
modelRange- the model range- Returns:
- the list of subranges
-
doOperation
public void doOperation(int operation) Description copied from interface:ITextOperationTargetPerforms the operation specified by the operation code on the target.doOperationmust only be called ifcanDoOperationreturnstrue.- Specified by:
doOperationin interfaceITextOperationTarget- Overrides:
doOperationin classSourceViewer- Parameters:
operation- the operation code
-
canDoOperation
public boolean canDoOperation(int operation) Description copied from interface:ITextOperationTargetReturns whether the operation specified by the given operation code can be performed.- Specified by:
canDoOperationin interfaceITextOperationTarget- Overrides:
canDoOperationin classSourceViewer- Parameters:
operation- the operation code- Returns:
trueif the specified operation can be performed
-
copyMarkedRegion
protected void copyMarkedRegion(boolean delete) Description copied from class:TextViewerCopies/cuts the marked region.- Overrides:
copyMarkedRegionin classTextViewer- Parameters:
delete-trueif the region should be deleted rather than copied.
-
widgetSelection2ModelSelection
Adapts the behavior of the super class to respect line based folding.- Overrides:
widgetSelection2ModelSelectionin classTextViewer- Parameters:
widgetSelection- the widget selection- Returns:
- the model selection while respecting line based folding
-
getFindReplaceDocumentAdapter
Description copied from class:TextViewerReturns the find/replace document adapter.- Overrides:
getFindReplaceDocumentAdapterin classTextViewer- Returns:
- the find/replace document adapter.
-
findAndSelect
protected int findAndSelect(int startPosition, String findString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord, boolean regExSearch) Description copied from class:TextViewerAdheres to the contract ofIFindReplaceTargetExtension3.findAndSelect(int, String, boolean, boolean, boolean, boolean).- Overrides:
findAndSelectin classTextViewer- Parameters:
startPosition- the start positionfindString- the find string specificationforwardSearch- the search directioncaseSensitive-trueif case sensitive,falseotherwisewholeWord-trueif matches must be whole words,falseotherwiseregExSearch-trueiffindStringis a regular expression,falseotherwise- Returns:
- the model offset of the first match
-
findAndSelectInRange
protected int findAndSelectInRange(int startPosition, String findString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord, int rangeOffset, int rangeLength, boolean regExSearch) Description copied from class:TextViewerAdheres to the contract ofIFindReplaceTargetExtension3.findAndSelect(int, String, boolean, boolean, boolean, boolean).- Overrides:
findAndSelectInRangein classTextViewer- Parameters:
startPosition- the start positionfindString- the find string specificationforwardSearch- the search directioncaseSensitive-trueif case sensitive,falseotherwisewholeWord-trueif matches must be whole words,falseotherwiserangeOffset- the search scope offsetrangeLength- the search scope lengthregExSearch-trueiffindStringis a regular expression,falseotherwise- Returns:
- the model offset of the first match
-