Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jface.text.source.projection
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:
  IInputProvider, IInputSelectionProvider, IPostSelectionProvider, ISelectionProvider, ISourceViewer, ISourceViewerExtension, ISourceViewerExtension2, ITextOperationTarget, ITextOperationTargetExtension, ITextViewer, ITextViewerExtension, ITextViewerExtension2, ITextViewerExtension3, ITextViewerExtension4, ITextViewerExtension5, IWidgetTokenOwner, IWidgetTokenOwnerExtension

public class ProjectionViewer
extends SourceViewer
implements ITextViewerExtension5

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.

This class should not be subclassed.

Since:
  3.0

Nested Class Summary

Nested classes inherited from class org.eclipse.jface.text.source.SourceViewer
`SourceViewer.RulerLayout`

Nested classes inherited from class org.eclipse.jface.text.TextViewer
`TextViewer.TextHoverKey, TextViewer.WidgetCommand`

Field Summary
`static int` | `COLLAPSE` Operation constant for the collapse operation.
`static int` | `EXPAND` Operation constant for the expand operation.
`static int` | `EXPAND_ALL` Operation constant for the expand all operation.
`static int` | `TOGGLE` Operation 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, fReconciler, fSelectionCategory, fSelections, fSelectionUpdater, GAP_SIZE, MODEL_ANNOTATION_MODEL`

Fields inherited from class org.eclipse.jface.text.TextViewer
`fAutoIndentStrategies, fDefaultPrefixChars, fDoubleClickStrategies, fEventConsumer, fFindReplaceDocumentAdapter, fHoverControlCreator, fIgnoreAutoIndent, fIndentChars, fInformationMapping, fLastTopPixel, fMarkPosition, fPaintManager, fPartitioning, fReplaceTextPresentation, fTextHovers, fTextInputListeners, fTextListeners, fTextPresentationListeners, fUndoManager, fViewportListeners, INTERNAL, KEY, MOUSE, MOUSE_END, RESIZE, SCROLLER, SHIFTING, TRACE_ERRORS`

Fields inherited from class org.eclipse.jface.viewers.Viewer
`WIDGET_DATA_KEY`

Fields inherited from interface org.eclipse.jface.text.source.ISourceViewer
`CONTENTASSIST_CONTEXT_INFORMATION, CONTENTASSIST_PROPOSALS, FORMAT, INFORMATION`

Fields inherited from interface org.eclipse.jface.text.ITextViewerExtension2
`DEFAULT_HOVER_STATE_MASK`

Fields inherited from interface org.eclipse.jface.text.ITextOperationTarget
`COPY, CUT, DELETE, PASTE, PREFIX, PRINT, REDO, SELECT_ALL, SHIFT_LEFT, SHIFT_RIGHT, STRIP_PREFIX, UNDO`

Constructor Summary
`ProjectionViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler, boolean showsAnnotationOverview, int styles)` Creates a new projection source viewer.

Method Summary
`void` | `addProjectionListener(IProjectionListener listener)` Adds a projection annotation listener to this viewer.
`void` | `addVerticalRulerColumn(IVerticalRulerColumn column)` Adds the give column as last column to this viewer's vertical ruler.
`boolean` | `canDoOperation(int operation)` Returns whether the operation specified by the given operation code can be performed.
`IRegion` | `computeCollapsedRegion(Position position)` Computes the region that must be collapsed when the given position is the position of an expanded projection annotation.
`Position` | `computeCollapsedRegionAnchor(Position position)` Computes the collapsed region anchor for the given position.
`protected void` | `copyMarkedRegion(boolean delete)` Copies/cuts the marked region.
`protected Layout` | `createLayout()` Creates the layout used for this viewer.
`protected ISlaveDocumentManager` | `createSlaveDocumentManager()` Creates a new slave document manager.
`protected IAnnotationModel` | `createVisualAnnotationModel(IAnnotationModel annotationModel)` Creates the visual annotation model on top of the given annotation model.
`void` | `disableProjection()` Disables the projection mode.
`void` | `doOperation(int operation)` Performs the operation specified by the operation code on the target.
`void` | `enableProjection()` Enables the projection mode.
`boolean` | `exposeModelRange(IRegion modelRange)` Exposes the given model range.
`protected int` | `findAndSelect(int startPosition, String findString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord, boolean regExSearch)` Adheres to the contract of `IFindReplaceTargetExtension3#findAndSelect(int, String, boolean, boolean, boolean, boolean)`.
`protected int` | `findAndSelectInRange(int startPosition, String findString, boolean forwardSearch, boolean caseSensitive, boolean wholeWord, int rangeOffset, int rangeLength, boolean regExSearch)` Adheres to the contract of `IFindReplaceTargetExtension3#findAndSelect(int, String, boolean, boolean, boolean, boolean)`.
`protected void` | `fireProjectionDisabled()` Notifies all registered projection listeners that projection mode has been disabled.
`protected void` | `fireProjectionEnabled()` Notifies 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 FindReplaceDocumentAdapter` | `getFindReplaceDocumentAdapter()` Returns the find/replace document adapter.
`ProjectionAnnotationModel` | `getProjectionAnnotationModel()` Returns the projection annotation model.
`IRegion` | `getVisibleRegion()` Returns the current visible region of this viewer's document.
`protected void` | `handleDispose()` Frees all resources allocated by this viewer.
`protected void` | `handleVerifyEvent(VerifyEvent e)` Handles the verify event issued by the viewer's text widget.
`protected void` | `handleVisibleDocumentChanged(DocumentEvent event)` Hook method called when the visible document has been changed.
`boolean` | `isProjectionMode()` Returns whether this viewer is in projection mode.
`boolean` | `overlapsWithVisibleRegion(int offset, int length)` Returns whether a given range overlaps with the visible region of this viewer's document.
`protected void` | `postCatchupRequest(AnnotationModelEvent event)` Posts the request for catch up with the annotation model into the UI thread.
`protected void` | `processCatchupRequest(AnnotationModelEvent event)` Processes the request for catch up with the annotation model in the UI thread.
`void` | `reinitializeProjection()` Forces this viewer to throw away any old state and to initialize its content from its projection annotation model.
`void` | `removeProjectionListener(IProjectionListener listener)` Removes the given listener from this viewer.
`void` | `removeVerticalRulerColumn(IVerticalRulerColumn column)` Removes the give column from this viewer's vertical ruler.
`void` | `resetVisibleRegion()` Resets the region of this viewer's document which is visible in the presentation.
`void` | `setDocument(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.
`void` | `setProjectionSummary(org.eclipse.jface.text.source.projection.ProjectionSummary projectionSummary)` Sets the projection summary for this viewer.
`void` | `setRangeIndication(int offset, int length, boolean moveCursor)` Sets the viewers's range indication to the specified range.
`protected void` | `setVisibleDocument(IDocument document)` Sets this viewer's visible document.
`void` | `setVisibleRegion(int start, int length)` Defines and sets the region of this viewer's document which will be visible in the presentation.
`protected boolean` | `updateSlaveDocument(IDocument slaveDocument, int modelRangeOffset, int modelRangeLength)` Updates the given slave document to show the specified range of its master document.
`protected Point` | `widgetSelection2ModelSelection(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, clearRememberedSelection, configure, createControl, createFormattingContext, enableOperation, ensureAnnotationHoverManagerInstalled, ensureOverviewHoverManagerInstalled, getAnnotationModel, getControl, getRangeIndication, getVerticalRuler, getVisualAnnotationModel, rememberSelection, removeRangeIndication, restoreSelection, setAnnotationHover, setDocument, setDocument, setDocument, setOverviewRulerAnnotationHover, setRangeIndicator, showAnnotations, showAnnotationsOverview, unconfigure, updateSlaveDocuments`

Methods 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, getMark, getModelCoverage, getPaintManager, getRewriteTarget, getSelectedRange, getSelection, getSelectionProvider, getSlaveDocumentManager, getTextHover, getTextHover, getTextHoveringController, getTextOperationTarget, getTextWidget, getTopIndex, getTopIndexStartOffset, getTopInset, getVisibleDocument, getVisibleLinesInViewport, getWidthInPixels, getWidthInPixels, handleVisibleDocumentAboutToBeChanged, ignoreAutoEditStrategies, initializeDocumentInformationMapping, inputChanged, internalRevealRange, invalidateTextPresentation, invalidateTextPresentation, isBlockSelected, isEditable, isIgnoringAutoEditStrategies, isPrintable, markChanged, modelLine2WidgetLine, modelOffset2WidgetOffset, modelRange2WidgetRange, modelRange2WidgetRange, modelSelection2WidgetSelection, modelStyleRange2WidgetStyleRange, moveFocusToWidgetToken, prependAutoEditStrategy, prependVerifyKeyListener, print, redraws, refresh, releaseWidgetToken, removeAutoEditStrategy, removePainter, removePostSelectionChangedListener, removeTextHovers, removeTextInputListener, removeTextListener, removeTextPresentationListener, removeVerifyKeyListener, removeViewportListener, requestWidgetToken, requestWidgetToken, resetPlugins, revealRange, selectContentTypePlugin, selectionChanged, setAutoIndentStrategy, setDefaultPrefixes, setDocumentPartitioning, setEditable, setEventConsumer, setHoverControlCreator, setIndentPrefixes, setInput, setMark, setRedraw, setRedraw, setSelectedRange, setSelection, setTextColor, setTextColor, setTextDoubleClickStrategy, setTextHover, setTextHover, setTopIndex, setUndoManager, shift, shift, startSequentialRewriteMode, stopSequentialRewriteMode, updateTextListeners, updateViewportListeners, updateVisibleDocument, validateSelectionRange, widgetLine2ModelLine, widgetLineOfWidgetOffset, widgetlLine2ModelLine, widgetOffset2ModelOffset, widgetRange2ModelRange`

Methods inherited from class org.eclipse.jface.viewers.Viewer
`addHelpListener, addSelectionChangedListener, fireHelpRequested, fireSelectionChanged, getData, handleHelpRequest, removeHelpListener, removeSelectionChangedListener, scrollDown, scrollUp, setData, setSelection`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.jface.text.ITextViewerExtension5
`getModelCoverage, modelLine2WidgetLine, modelOffset2WidgetOffset, modelRange2WidgetRange, widgetLine2ModelLine, widgetLineOfWidgetOffset, widgetOffset2ModelOffset, widgetRange2ModelRange`

Methods inherited from interface org.eclipse.jface.text.ITextViewerExtension3
`widgetlLine2ModelLine`

Methods 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, setUndoManager`

Methods inherited from interface org.eclipse.jface.viewers.ISelectionProvider
`addSelectionChangedListener, removeSelectionChangedListener, setSelection`

Field Detail

### EXPAND

    public static final int EXPAND

  Operation constant for the expand operation.

  See Also:
    Constant Field Values

### COLLAPSE

    public static final int COLLAPSE

  Operation constant for the collapse operation.

  See Also:
    Constant Field Values

### TOGGLE

    public static final int TOGGLE

  Operation constant for the toggle projection operation.

  See Also:
    Constant Field Values

### EXPAND_ALL

    public static final int EXPAND_ALL

  Operation constant for the expand all operation.

  See Also:
    Constant Field Values

Constructor Detail

### ProjectionViewer

    public ProjectionViewer(Composite parent,
                            IVerticalRuler ruler,
                            IOverviewRuler overviewRuler,
                            boolean showsAnnotationOverview,
                            int styles)

  Creates a new projection source viewer.

Parameters:
  `parent` - the SWT parent control
  `ruler` - the vertical ruler
  `overviewRuler` - the overview ruler
  `showsAnnotationOverview` - `true` if the overview ruler should be shown
  `styles` - the SWT style bits

Method Detail

### createLayout

    protected Layout createLayout()

  Description copied from class: `SourceViewer`
  Creates the layout used for this viewer. Subclasses may override this method.

  Overrides:
    `createLayout` in class `SourceViewer`
  Returns:
    the layout used for this viewer

### 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: `ISourceViewer`
  Sets 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 appropriate `TextEvent` is issued. The text event does not carry a related document event. This method is a convenience method for `setDocument(document, annotationModel);setVisibleRegion(offset, length)`.

  Specified by:
    `setDocument` in interface `ISourceViewer`
  Overrides:
    `setDocument` in class `SourceViewer`

### createVisualAnnotationModel

    protected IAnnotationModel createVisualAnnotationModel(IAnnotationModel annotationModel)

  Description copied from class: `SourceViewer`
  Creates the visual annotation model on top of the given annotation model.

  Overrides:
    `createVisualAnnotationModel` in class `SourceViewer`
  Parameters:
    `annotationModel` - the wrapped annotation model
  Returns:
    the visual annotation model on top of the given annotation model

### getProjectionAnnotationModel

    public ProjectionAnnotationModel getProjectionAnnotationModel()

  Returns the projection annotation model.

  Returns:
    the projection annotation model

### createSlaveDocumentManager

    protected ISlaveDocumentManager createSlaveDocumentManager()

  Description copied from class: `TextViewer`
  Creates a new slave document manager. This implementation always returns a `ChildDocumentManager`.

  Overrides:
    `createSlaveDocumentManager` in class `TextViewer`
  Returns:
    ISlaveDocumentManager

### updateSlaveDocument

    protected boolean updateSlaveDocument(IDocument slaveDocument,
                                          int modelRangeOffset,
                                          int modelRangeLength)
                                   throws BadLocationException

  Description copied from class: `TextViewer`
  Updates the given slave document to show the specified range of its master document.

  Overrides:
    `updateSlaveDocument` in class `TextViewer`
  Parameters:
    `slaveDocument` - the slave document
    `modelRangeOffset` - the offset of the master document range
    `modelRangeLength` - the length of the master document range
  Returns:
    `true` if the slave has been adapted successfully
  Throws:
    `BadLocationException` - in case the specified range is not valid in the master document

### addProjectionListener

    public void addProjectionListener(IProjectionListener listener)

  Adds a projection annotation listener to this viewer. The listener may not be `null`. If the listener is already registered, this method does not have any effect.

  Parameters:
    `listener` - the listener to add

### removeProjectionListener

    public void removeProjectionListener(IProjectionListener listener)

  Removes the given listener from this viewer. The listener may not be `null`. 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:
    `true` if this viewer is in projection mode, `false` otherwise

### 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: `ITextViewer`
  Defines 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:
    `setVisibleRegion` in interface `ITextViewer`
  Overrides:
    `setVisibleRegion` in class `TextViewer`

### setVisibleDocument

    protected void setVisibleDocument(IDocument document)

  Description copied from class: `TextViewer`
  Sets this viewer's visible document. The visible document represents the visible region of the viewer's input document.

  Overrides:
    `setVisibleDocument` in class `TextViewer`
  Parameters:
    `document` - the visible document

### resetVisibleRegion

    public void resetVisibleRegion()

  Description copied from interface: `ITextViewer`
  Resets the region of this viewer's document which is visible in the presentation. Afterwards, the whole input document is visible.

  Specified by:
    `resetVisibleRegion` in interface `ITextViewer`
  Overrides:
    `resetVisibleRegion` in class `TextViewer`

### getVisibleRegion

    public IRegion getVisibleRegion()

  Description copied from interface: `ITextViewer`
  Returns the current visible region of this viewer's document. The result may differ from the argument passed to `setVisibleRegion` if 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 `ITextViewerExtension5` may be forced to change the fractions of the input document that are shown, in order to fulfill this contract.

  Specified by:
    `getVisibleRegion` in interface `ITextViewer`
  Overrides:
    `getVisibleRegion` in class `TextViewer`

### overlapsWithVisibleRegion

    public boolean overlapsWithVisibleRegion(int offset,
                                             int length)

  Description copied from interface: `ITextViewer`
  Returns whether a given range overlaps with the visible region of this viewer's document.

  Viewers implementing `ITextViewerExtension5`may 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:
    `overlapsWithVisibleRegion` in interface `ITextViewer`
  Overrides:
    `overlapsWithVisibleRegion` in class `TextViewer`

### processCatchupRequest

    protected final void processCatchupRequest(AnnotationModelEvent event)

  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

    protected final void postCatchupRequest(AnnotationModelEvent event)

  Posts the request for catch up with the annotation model into the UI thread.

  Parameters:
    `event` - the annotation model event

### computeCollapsedRegion

    public IRegion computeCollapsedRegion(Position position)

  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

    public Position computeCollapsedRegionAnchor(Position position)

  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

    public final void reinitializeProjection()
                                      throws BadLocationException

  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

    protected void handleVerifyEvent(VerifyEvent e)

  Description copied from class: `TextViewer`
  Handles the verify event issued by the viewer's text widget.

  Overrides:
    `handleVerifyEvent` in class `TextViewer`
  Parameters:
    `e` - the verify event
  See Also:
    `VerifyListener.verifyText(VerifyEvent)`

### addVerticalRulerColumn

    public void addVerticalRulerColumn(IVerticalRulerColumn column)

  Adds the give column as last column to this viewer's vertical ruler.

  Parameters:
    `column` - the column to be added

### removeVerticalRulerColumn

    public void removeVerticalRulerColumn(IVerticalRulerColumn column)

  Removes the give column from this viewer's vertical ruler.

  Parameters:
    `column` - the column to be removed

### exposeModelRange

    public boolean exposeModelRange(IRegion modelRange)

  Description copied from interface: `ITextViewerExtension5`
  Exposes the given model range. Returns whether this call caused a change of the set of exposed model ranges.

  Specified by:
    `exposeModelRange` in interface `ITextViewerExtension5`
  Parameters:
    `modelRange` - the model range to be exposed
  Returns:
    `true` if the set of exposed model ranges changed, `false` otherwise

### setRangeIndication

    public void setRangeIndication(int offset,
                                   int length,
                                   boolean moveCursor)

  Description copied from interface: `ISourceViewer`
  Sets the viewers's range indication to the specified range. Its is indicated whether the cursor should also be moved to the beginning of the specified range.

  Specified by:
    `setRangeIndication` in interface `ISourceViewer`
  Overrides:
    `setRangeIndication` in class `SourceViewer`

### handleDispose

    protected void handleDispose()

  Description copied from class: `TextViewer`
  Frees all resources allocated by this viewer. Internally called when the viewer's control has been disposed.

  Overrides:
    `handleDispose` in class `SourceViewer`

### handleVisibleDocumentChanged

    protected void handleVisibleDocumentChanged(DocumentEvent event)

  Description copied from class: `TextViewer`
  Hook method called when the visible document has been changed.

  Subclasses may override.

  Overrides:
    `handleVisibleDocumentChanged` in class `TextViewer`
  Parameters:
    `event` - the document event

### getCoveredModelRanges

    public IRegion[] getCoveredModelRanges(IRegion modelRange)

  Description copied from interface: `ITextViewerExtension5`
  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.

  Specified by:
    `getCoveredModelRanges` in interface `ITextViewerExtension5`
  Parameters:
    `modelRange` - the model range
  Returns:
    the list of subranges

### doOperation

    public void doOperation(int operation)

  Description copied from interface: `ITextOperationTarget`
  Performs the operation specified by the operation code on the target. `doOperation` must only be called if `canDoOperation` returns `true`.

  Specified by:
    `doOperation` in interface `ITextOperationTarget`
  Overrides:
    `doOperation` in class `SourceViewer`

### canDoOperation

    public boolean canDoOperation(int operation)

  Description copied from interface: `ITextOperationTarget`
  Returns whether the operation specified by the given operation code can be performed.

  Specified by:
    `canDoOperation` in interface `ITextOperationTarget`
  Overrides:
    `canDoOperation` in class `SourceViewer`

### copyMarkedRegion

    protected void copyMarkedRegion(boolean delete)

  Description copied from class: `TextViewer`
  Copies/cuts the marked region.

  Overrides:
    `copyMarkedRegion` in class `TextViewer`
  Parameters:
    `delete` - `true` if the region should be deleted rather than copied.

### widgetSelection2ModelSelection

    protected Point widgetSelection2ModelSelection(Point widgetSelection)

  Adapts the behavior of the super class to respect line based folding.

  Overrides:
    `widgetSelection2ModelSelection` in class `TextViewer`
  Parameters:
    `widgetSelection` - the widget selection
  Returns:
    the model selection while respecting line based folding

### getFindReplaceDocumentAdapter

    protected FindReplaceDocumentAdapter getFindReplaceDocumentAdapter()

  Description copied from class: `TextViewer`
  Returns the find/replace document adapter.

  Overrides:
    `getFindReplaceDocumentAdapter` in class `TextViewer`
  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: `TextViewer`
  Adheres to the contract of `IFindReplaceTargetExtension3.findAndSelect(int, String, boolean, boolean, boolean, boolean)`.

  Overrides:
    `findAndSelect` in class `TextViewer`
  Parameters:
    `startPosition` - the start position
    `findString` - the find string specification
    `forwardSearch` - the search direction
    `caseSensitive` - `true` if case sensitive, `false` otherwise
    `wholeWord` - `true` if matches must be whole words, `false` otherwise
    `regExSearch` - `true` if `findString` is a regular expression, `false` otherwise
  Returns:
    the widget 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: `TextViewer`
  Adheres to the contract of `IFindReplaceTargetExtension3.findAndSelect(int, String, boolean, boolean, boolean, boolean)`.

  Overrides:
    `findAndSelectInRange` in class `TextViewer`
  Parameters:
    `startPosition` - the start position
    `findString` - the find string specification
    `forwardSearch` - the search direction
    `caseSensitive` - `true` if case sensitive, `false` otherwise
    `wholeWord` - `true` if matches must be whole words, `false` otherwise
    `rangeOffset` - the search scope offset
    `rangeLength` - the search scope length
    `regExSearch` - `true` if `findString` is a regular expression, `false` otherwise
  Returns:
    the widget offset of the first match

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.