|
|||||||||
| Home >> All >> org >> eclipse >> jface >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.jface.text
Interface IDocumentPartitionerExtension2

- public interface IDocumentPartitionerExtension2
Extension interface for IDocumentPartitioner.
Extends the original concept of a document partitioner to answer the position categories that are used to manage the partitioning information.
This extension also introduces the concept of open and delimited partitions. A delimited partition has a predefined textual token delimiting its start and end, while an open partition can fill any space between two delimited partitions.
An open partition of length zero can occur between two delimited partitions, thus having the same offset as the following delimited partition. The document start and end are considered to be delimiters of open partitions, i.e. there may be a zero-length partition between the document start and a delimited partition starting at offset 0.
- Since:
- 3.0
| Method Summary | |
ITypedRegion[] |
computePartitioning(int offset,
int length,
boolean includeZeroLengthPartitions)
Returns the partitioning of the given range of the connected document. |
java.lang.String |
getContentType(int offset,
boolean preferOpenPartitions)
Returns the content type of the partition containing the given offset in the connected document. |
java.lang.String[] |
getManagingPositionCategories()
Returns the position categories that this partitioners uses in order to manage the partitioning information of the documents. |
ITypedRegion |
getPartition(int offset,
boolean preferOpenPartitions)
Returns the partition containing the given offset of the connected document. |
| Method Detail |
getManagingPositionCategories
public java.lang.String[] getManagingPositionCategories()
- Returns the position categories that this partitioners uses in order to manage
the partitioning information of the documents. Returns
nullif no position category is used.
getContentType
public java.lang.String getContentType(int offset, boolean preferOpenPartitions)
- Returns the content type of the partition containing the given offset in
the connected document. There must be a document connected to this
partitioner.
If
preferOpenPartitionsistrue, precedence is given to an open partition ending atoffsetover a delimited partition starting atoffset.This method replaces
IDocumentPartitioner.getContentType(int)55 and behaves like it whenprepreferOpenPartitionsisfalse, i.e. precedence is always given to the partition that does not end atoffset.
getPartition
public ITypedRegion getPartition(int offset, boolean preferOpenPartitions)
- Returns the partition containing the given offset of the connected
document. There must be a document connected to this partitioner.
If
preferOpenPartitionsistrue, precedence is given to an open partition ending atoffsetover a delimited partition starting atoffset.This method replaces
IDocumentPartitioner.getPartition(int)55 and behaves like it whenis false, i.e. precedence is always given to the partition that does not end atoffset.
computePartitioning
public ITypedRegion[] computePartitioning(int offset, int length, boolean includeZeroLengthPartitions)
- Returns the partitioning of the given range of the connected document.
There must be a document connected to this partitioner.
If
includeZeroLengthPartitionsistrue, a zero-length partition of an open partition type (usually the default partition) is included between two delimited partitions. If it isfalse, no zero-length partitions are included.This method replaces
IDocumentPartitioner.computePartitioning(int, int)55 and behaves like it whenincludeZeroLengthPartitionsisfalse.
|
|||||||||
| Home >> All >> org >> eclipse >> jface >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC