Package org.eclipse.ui.console

## Interface IConsoleDocumentPartitioner

All Superinterfaces:
  `IDocumentPartitioner`

    public interface IConsoleDocumentPartitioner
    extends IDocumentPartitioner

A document partitioner for a text console.

In addition to regular partitioner duties, a console document partitioner dictates which regions in its document are read-only and provides style ranges.

Clients may implement this interface.

In order to provided backward compatibility for clients of `IConsoleDocumentPartitioner`, extension interfaces are used to provide a means of evolution. The following extension interfaces exist:

- `IConsoleDocumentPartitionerExtension` since version 3.9 adding more possibilities to query read-only regions.

Since:
  3.1
See Also:
  `TextConsole`, `IConsoleDocumentPartitionerExtension`

### Method Summary

All Methods Instance Methods Abstract Methods
`StyleRange[]` `getStyleRanges​(int offset, int length)` Returns style ranges for the specified region of this partitioner's document to use when rendering, or `null` if none.
`boolean` `isReadOnly​(int offset)` Returns whether this partitioner's document is read-only at the specified offset.

### Methods inherited from interface org.eclipse.jface.text.IDocumentPartitioner

`computePartitioning, connect, disconnect, documentAboutToBeChanged, documentChanged, getContentType, getLegalContentTypes, getPartition`

### Method Detail

#### isReadOnly

    boolean isReadOnly​(int offset)

Returns whether this partitioner's document is read-only at the specified offset. The user is not allowed to type in read-only locations.

Parameters:
  `offset` - document offset
Returns:
  whether this partitioner's document is read-only at the specified offset

#### getStyleRanges

    StyleRange[] getStyleRanges​(int offset,
                                int length)

Returns style ranges for the specified region of this partitioner's document to use when rendering, or `null` if none.

Parameters:
  `offset` - beginning offset for which style ranges are requested
  `length` - the length of text for which style ranges are requested
Returns:
  style ranges for the specified region of this partitioner's document to use when rendering, or `null` if none