|
|||||||||
| 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 IDocumentExtension3

- All Known Implementing Classes:
- AbstractDocument
- public interface IDocumentExtension3
Extension interface for IDocument.
Adds the concept of multiple partitionings and the concept of zero-length partitions in conjunction with open and delimited partitions. A delimited partition has a well defined start delimiter and a well defined end delimiter. Between two delimited partitions there may be an open partition of length zero.
In order to fulfill the contract of this interface, the document must be configured with a document partitioner implementing IDocumentPartitionerExtension2.
- Since:
- 3.0
| Field Summary | |
static java.lang.String |
DEFAULT_PARTITIONING
The identifier of the default partitioning. |
| Method Summary | |
ITypedRegion[] |
computePartitioning(java.lang.String partitioning,
int offset,
int length,
boolean includeZeroLengthPartitions)
Computes the partitioning of the given document range based on the given partitioning type. |
java.lang.String |
getContentType(java.lang.String partitioning,
int offset,
boolean preferOpenPartitions)
Returns the type of the document partition containing the given offset for the given partitioning. |
IDocumentPartitioner |
getDocumentPartitioner(java.lang.String partitioning)
Returns the partitioner for the given partitioning or null if
no partitioner is registered. |
java.lang.String[] |
getLegalContentTypes(java.lang.String partitioning)
Returns the set of legal content types of document partitions for the given partitioning This set can be empty. |
ITypedRegion |
getPartition(java.lang.String partitioning,
int offset,
boolean preferOpenPartitions)
Returns the document partition of the given partitioning in which the given offset is located. |
java.lang.String[] |
getPartitionings()
Returns the existing partitionings for this document. |
void |
setDocumentPartitioner(java.lang.String partitioning,
IDocumentPartitioner partitioner)
Sets this document's partitioner. |
| Field Detail |
DEFAULT_PARTITIONING
public static final java.lang.String DEFAULT_PARTITIONING
- The identifier of the default partitioning.
- See Also:
- Constant Field Values
| Method Detail |
getPartitionings
public java.lang.String[] getPartitionings()
- Returns the existing partitionings for this document. This includes
the default partitioning.
getLegalContentTypes
public java.lang.String[] getLegalContentTypes(java.lang.String partitioning) throws BadPartitioningException
- Returns the set of legal content types of document partitions for the given partitioning
This set can be empty. The set can contain more content types than contained by the
result of
getPartitioning(partitioning, 0, getLength()).
getContentType
public java.lang.String getContentType(java.lang.String partitioning, int offset, boolean preferOpenPartitions) throws BadLocationException, BadPartitioningException
- Returns the type of the document partition containing the given offset
for the given partitioning. This is a convenience method for
getPartition(partitioning, offset, boolean).getType().If
This is only supported if the connectedpreferOpenPartitionsistrue, precedence is given to an open partition ending atoffsetover a delimited partition starting atoffset. If it isfalse, precedence is given to the partition that does not end atoffset.IDocumentPartitionersupports it, i.e. implementsIDocumentPartitionerExtension2. Otherwise,preferOpenPartitionsis ignored.
getPartition
public ITypedRegion getPartition(java.lang.String partitioning, int offset, boolean preferOpenPartitions) throws BadLocationException, BadPartitioningException
- Returns the document partition of the given partitioning in which the
given offset is located.
If
This is only supported if the connectedpreferOpenPartitionsistrue, precedence is given to an open partition ending atoffsetover a delimited partition starting atoffset. If it isfalse, precedence is given to the partition that does not end atoffset.IDocumentPartitionersupports it, i.e. implementsIDocumentPartitionerExtension2. Otherwise,preferOpenPartitionsis ignored.
computePartitioning
public ITypedRegion[] computePartitioning(java.lang.String partitioning, int offset, int length, boolean includeZeroLengthPartitions) throws BadLocationException, BadPartitioningException
- Computes the partitioning of the given document range based on the given
partitioning type.
If
This is only supported if the connectedincludeZeroLengthPartitionsistrue, a zero-length partition of an open partition type (usually the default partition) is included between two closed partitions. If it isfalse, no zero-length partitions are included.IDocumentPartitionersupports it, i.e. implementsIDocumentPartitionerExtension2. Otherwise,includeZeroLengthPartitionsis ignored.
setDocumentPartitioner
public void setDocumentPartitioner(java.lang.String partitioning, IDocumentPartitioner partitioner)
- Sets this document's partitioner. The caller of this method is responsible for
disconnecting the document's old partitioner from the document and to
connect the new partitioner to the document. Informs all document partitioning
listeners about this change.
getDocumentPartitioner
public IDocumentPartitioner getDocumentPartitioner(java.lang.String partitioning)
- Returns the partitioner for the given partitioning or
nullif no partitioner is registered.
|
|||||||||
| Home >> All >> org >> eclipse >> jface >> [ text overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC