public interface FormattingProgressCallback
| Modifier and Type | Interface and Description |
|---|---|
static class |
FormattingProgressCallback.EventType |
| Modifier and Type | Field and Description |
|---|---|
static FormattingProgressCallback |
EMPTY
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addCallback(FormattingProgressCallback.EventType eventType,
java.lang.Runnable callback)
Allows to register callback for the target event type.
|
void |
afterApplyingChange(LeafBlockWrapper block)
Notifies current indicator that change from the given
wrapped code block is successfully flushed
to the underlying document. |
void |
afterProcessingBlock(LeafBlockWrapper block)
Notifies current indicator that given
wrapped code block is processed, i.e. |
void |
afterWrappingBlock(LeafBlockWrapper wrapped)
Notifies current indicator that particular
code block is wrapped. |
void |
beforeApplyingFormatChanges(java.util.Collection<LeafBlockWrapper> modifiedBlocks)
Notifies current indicator that changes from the given
wrapped code blocks are about to be flushed
to the underlying document. |
void |
setTask(SequentialTask task)
Allows to define an actual formatting task to process.
|
static final FormattingProgressCallback EMPTY
void afterWrappingBlock(LeafBlockWrapper wrapped)
code block is wrapped.wrapped - wrapped code blockFormattingStateId.WRAPPING_BLOCKSvoid afterProcessingBlock(LeafBlockWrapper block)
wrapped code block is processed, i.e. its
white space is adjusted as necessary.block - processed wrapped block which white space if adjustedFormattingStateId.PROCESSING_BLOCKSvoid beforeApplyingFormatChanges(java.util.Collection<LeafBlockWrapper> modifiedBlocks)
wrapped code blocks are about to be flushed
to the underlying document.modifiedBlocks - blocks with modified white spaces which are about
to be flushed to the underlying documentFormattingStateId.APPLYING_CHANGESvoid afterApplyingChange(LeafBlockWrapper block)
wrapped code block is successfully flushed
to the underlying document.block - wrapped code block which change is successfully flushed to the underlying documentFormattingStateId.APPLYING_CHANGESvoid setTask(SequentialTask task)
part by part until the task is finished.
That 'part-by-part' processing is assumed to update current indicator (call 'beforeXxx()'
and 'afterXxx()' methods).task - formatter task to processboolean addCallback(FormattingProgressCallback.EventType eventType, java.lang.Runnable callback)
eventType - target event typecallback - callback to register for the given event typetrue if given callback is successfully registered for the given event type;
false otherwise