|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Extension interface for IContentFormatter
.
Updates the content formatter to be able to pass IFormattingContext
context objects to IFormattingStrategyExtension
objects
operating in context based mode.
Clients using context based formatting call the method
format(IDocument, IFormattingContext)
with a properly
initialized formatting context.
The formatting context must be set up according to the desired formatting mode:
FormattingContextProperties.CONTEXT_DOCUMENT
.
This is equivalent to setting FormattingContextProperties.CONTEXT_REGION
with a region spanning
the whole document.FormattingContextProperties.CONTEXT_REGION
.
Note that the content formatter automatically aligns the region to a block selected region,
and if the region spans multiple partitions, it also completes eventual partitions covered only
partially by the region.FormattingContextProperties.CONTEXT_PREFERENCES
.
Note that in context based mode the content formatter is fully reentrant, but not thread-safe.
IFormattingContext
,
FormattingContextProperties
Method Summary | |
void |
format(IDocument document,
IFormattingContext context)
Formats the given region of the specified document. |
Method Detail |
public void format(IDocument document, IFormattingContext context)
The formatter may safely assume that it is the only subject that modifies the document at this point in time. This method is fully reentrant, but not thread-safe.
The formatting process performed by format(IDocument, IFormattingContext)
happens as follows:
document
- The document to be formattedcontext
- The formatting context to pass to the formatting strategies.
This argument must not be null
.
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.