Package org.eclipse.jface.text
Interface ITextViewerExtension5
- All Superinterfaces:
- ITextViewerExtension3
- All Known Implementing Classes:
- ProjectionViewer
Extension interface for 
ITextViewer. Defines
 a conceptual replacement of the original visible region concept. This interface
 replaces ITextViewerExtension3.
 Introduces the explicit concept of model and widget coordinates. For example, a selection returned by the text viewer's control is a widget selection. A widget selection always maps to a certain range of the viewer's document. This range is considered the model selection.
All model ranges that have a corresponding widget ranges are considered "exposed model ranges". The viewer can be requested to expose a given model range. Thus, a visible region is a particular degeneration of exposed model ranges.
This interface allows implementers to follow a sophisticated presentation model in which the visible presentation is a complex projection of the viewer's input document.
- Since:
- 3.0
- 
Method SummaryModifier and TypeMethodDescriptionbooleanexposeModelRange(IRegion modelRange) Exposes the given model range.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.Returns the minimal region of the viewer's input document that completely comprises everything that is visible in the viewer's widget ornullif there is no such region.intmodelLine2WidgetLine(int modelLine) Returns the widget line that corresponds to the given line of the viewer's input document or-1if there is no such line.intmodelOffset2WidgetOffset(int modelOffset) Returns the widget offset that corresponds to the given offset in the viewer's input document or-1if there is no such offsetmodelRange2WidgetRange(IRegion modelRange) Returns the minimal region of the viewer's widget that completely comprises the given region of the viewer's input document ornullif there is no such region.intwidgetLine2ModelLine(int widgetLine) Returns the line of the viewer's input document that corresponds to the given widget line or-1if there is no such line.intwidgetLineOfWidgetOffset(int widgetOffset) Returns the widget line of the given widget offset.intwidgetOffset2ModelOffset(int widgetOffset) Returns the offset of the viewer's input document that corresponds to the given widget offset or-1if there is no such offsetwidgetRange2ModelRange(IRegion widgetRange) Returns the minimal region of the viewer's input document that completely comprises the given widget region ornullif there is no such region.Methods inherited from interface org.eclipse.jface.text.ITextViewerExtension3widgetlLine2ModelLine
- 
Method Details- 
getModelCoverageIRegion getModelCoverage()Returns the minimal region of the viewer's input document that completely comprises everything that is visible in the viewer's widget ornullif there is no such region.- Specified by:
- getModelCoveragein interface- ITextViewerExtension3
- Returns:
- the minimal region of the viewer's document comprising the
         contents of the viewer's widget or null
 
- 
modelLine2WidgetLineint modelLine2WidgetLine(int modelLine) Returns the widget line that corresponds to the given line of the viewer's input document or-1if there is no such line.- Specified by:
- modelLine2WidgetLinein interface- ITextViewerExtension3
- Parameters:
- modelLine- the line of the viewer's document
- Returns:
- the corresponding widget line or -1
 
- 
modelOffset2WidgetOffsetint modelOffset2WidgetOffset(int modelOffset) Returns the widget offset that corresponds to the given offset in the viewer's input document or-1if there is no such offset- Specified by:
- modelOffset2WidgetOffsetin interface- ITextViewerExtension3
- Parameters:
- modelOffset- the offset in the viewer's document
- Returns:
- the corresponding widget offset or -1
 
- 
modelRange2WidgetRangeReturns the minimal region of the viewer's widget that completely comprises the given region of the viewer's input document ornullif there is no such region.- Specified by:
- modelRange2WidgetRangein interface- ITextViewerExtension3
- Parameters:
- modelRange- the region of the viewer's document
- Returns:
- the minimal region of the widget comprising
         modelRangeornull
 
- 
widgetOffset2ModelOffsetint widgetOffset2ModelOffset(int widgetOffset) Returns the offset of the viewer's input document that corresponds to the given widget offset or-1if there is no such offset- Specified by:
- widgetOffset2ModelOffsetin interface- ITextViewerExtension3
- Parameters:
- widgetOffset- the widget offset
- Returns:
- the corresponding offset in the viewer's document or
         -1
 
- 
widgetRange2ModelRangeReturns the minimal region of the viewer's input document that completely comprises the given widget region ornullif there is no such region.- Specified by:
- widgetRange2ModelRangein interface- ITextViewerExtension3
- Parameters:
- widgetRange- the widget region
- Returns:
- the minimal region of the viewer's document comprising
         widgetlRangeornull
 
- 
widgetLine2ModelLineint widgetLine2ModelLine(int widgetLine) Returns the line of the viewer's input document that corresponds to the given widget line or-1if there is no such line.- Parameters:
- widgetLine- the widget line
- Returns:
- the corresponding line of the viewer's document or
         -1
 
- 
widgetLineOfWidgetOffsetint widgetLineOfWidgetOffset(int widgetOffset) Returns the widget line of the given widget offset.- Specified by:
- widgetLineOfWidgetOffsetin interface- ITextViewerExtension3
- Parameters:
- widgetOffset- the widget offset
- Returns:
- the widget line of the widget offset
 
- 
getCoveredModelRangesReturns the maximal subranges of the given model range thus that there is no offset inside a subrange for which there is no image offset.- Parameters:
- modelRange- the model range
- Returns:
- the list of subranges
 
- 
exposeModelRangeExposes the given model range. Returns whether this call caused a change of the set of exposed model ranges.- Parameters:
- modelRange- the model range to be exposed
- Returns:
- trueif the set of exposed model ranges changed,- falseotherwise
 
 
-