Package org.eclipse.ui.console
Interface IConsoleDocumentPartitionerExtension
public interface IConsoleDocumentPartitionerExtension
Extension interface for 
IConsoleDocumentPartitioner.
 It adds more possibilities to query read-only regions of the partitioned document.
- Since:
- 3.9
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionReturns all partitions which are read-only.computeReadOnlyPartitions(int offset, int length) Returns all read-only partitions in given range.Returns all partitions which are writable.computeWritablePartitions(int offset, int length) Returns all writable partitions in given range.booleancontainsReadOnly(int offset, int length) Returns whether this partitioner's document is read-only at any point in the specified range.intgetNextOffsetByState(int offset, boolean searchWritable) Get this offset or the nearest offset after which is, depending on argument, writable or read-only.intgetPreviousOffsetByState(int offset, boolean searchWritable) Get this offset or the nearest offset before which is, depending on argument, writable or read-only.booleanisReadOnly(int offset, int length) Returns whether this partitioner's document is read-only in the specified range.
- 
Method Details- 
computeReadOnlyPartitionsITypedRegion[] computeReadOnlyPartitions()Returns all partitions which are read-only.- Returns:
- all read-only partitions. Ordered by offset and never
         null.
 
- 
computeReadOnlyPartitionsReturns all read-only partitions in given range.- Parameters:
- offset- the offset of the range of interest
- length- the length of the range of interest
- Returns:
- read-only partitions in given range. Ordered by offset and never
         null. Returned regions may start and/or end outside given range.
 
- 
computeWritablePartitionsITypedRegion[] computeWritablePartitions()Returns all partitions which are writable.- Returns:
- all writable partitions. Ordered by offset and never
         null.
 
- 
computeWritablePartitionsReturns all writable partitions in given range.- Parameters:
- offset- the offset of the range of interest
- length- the length of the range of interest
- Returns:
- writable partitions in given range. Ordered by offset and never
         null. Returned regions may start and/or end outside given range.
 
- 
isReadOnlyboolean isReadOnly(int offset, int length) Returns whether this partitioner's document is read-only in the specified range. Only returnstrueif the whole range is read-only.- Parameters:
- offset- document offset
- length- range length
- Returns:
- whether this partitioner's document is read-only in the specific range
 
- 
containsReadOnlyboolean containsReadOnly(int offset, int length) Returns whether this partitioner's document is read-only at any point in the specified range.- Parameters:
- offset- document offset
- length- range length
- Returns:
- returns trueif any offset in the given range is read-only
 
- 
getPreviousOffsetByStateint getPreviousOffsetByState(int offset, boolean searchWritable) Get this offset or the nearest offset before which is, depending on argument, writable or read-only.- Parameters:
- offset- the offset of interest
- searchWritable- if- truereturn the nearest writable offset. If- falsereturn the nearest read-only offset.
- Returns:
- the given offset if it has the requested read-only/writable state or
         the nearest offset before with requested state. Returns
         -1if there is no offset with requested state before requested offset.
 
- 
getNextOffsetByStateint getNextOffsetByState(int offset, boolean searchWritable) Get this offset or the nearest offset after which is, depending on argument, writable or read-only.- Parameters:
- offset- the offset of interest
- searchWritable- if- truereturn the nearest writable offset. If- falsereturn the nearest read-only offset.
- Returns:
- the given offset if it has the requested read-only/writable state or the nearest offset after with requested state. Returns the document length if there is no offset with requested state after requested offset.
 
 
-