public interface CodeFoldingProvider<B>
Modifier and Type | Method and Description |
---|---|
void |
beginCompoundEdit(CodeFoldingModel<B> model)
Notifies this provider that a compound edit has started.
|
CodeFoldingModel<B> |
createModel(BasicEditorPane editorPane)
Creates a new data model describing the collapsible source code
blocks in the document attached to the specified editor component.
|
void |
endCompoundEdit(CodeFoldingModel<B> model)
Notifies this provider that a compound edit has ended.
|
javax.swing.JPopupMenu |
getPopupMenu()
Returns the popup menu of actions that can be performed by the
provider.
|
void |
insertUpdate(CodeFoldingModel<B> model,
int offset,
int length)
Executes an immediate update of the model due to an insertion in the
document.
|
void |
removeUpdate(CodeFoldingModel<B> model,
int offset,
int length)
Executes an immediate update of the model due to a deletion in the
document.
|
CodeFoldingModel<B> createModel(BasicEditorPane editorPane)
editorPane
- the editor pane componentvoid beginCompoundEdit(CodeFoldingModel<B> model)
insertUpdate(oracle.javatools.editor.folding.CodeFoldingModel<B>, int, int)
s and removeUpdate(oracle.javatools.editor.folding.CodeFoldingModel<B>, int, int)
s, and then an
endCompoundEdit(oracle.javatools.editor.folding.CodeFoldingModel<B>)
will follow immediately. This method will not
be called for singleton edits.
When a compound edit is in progress, implementations are encouraged to
defer UI updates from insertUpdate(oracle.javatools.editor.folding.CodeFoldingModel<B>, int, int)
and removeUpdate(oracle.javatools.editor.folding.CodeFoldingModel<B>, int, int)
to
endCompoundEdit(oracle.javatools.editor.folding.CodeFoldingModel<B>)
.
model
- the code folding data model.void insertUpdate(CodeFoldingModel<B> model, int offset, int length)
model
- the code folding data modeloffset
- the caret offset of the insertionlength
- the length in characters of the inserted textvoid removeUpdate(CodeFoldingModel<B> model, int offset, int length)
model
- the code folding data modeloffset
- the caret offset of the deletionlength
- the length in characters of the deleted textvoid endCompoundEdit(CodeFoldingModel<B> model)
model
- the code folding data model.beginCompoundEdit(oracle.javatools.editor.folding.CodeFoldingModel<B>)
javax.swing.JPopupMenu getPopupMenu()
null
if no actions are supported.null
if no actions are supported