public class TextTransformAdapter extends TransformAdapter
TransformAdapter
for transforms which modify text buffers directly.TransformAdapter.ConstructRegion, TransformAdapter.LocationRegion, TransformAdapter.Region
Constructor and Description |
---|
TextTransformAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
beginTransform(TransformContext context)
Begins a transform of this type.
|
void |
cancelTransform(TransformContext context)
Cancels a transform of this type.
|
TransformContext |
createContext(Transform transform,
Violation violation,
Location location)
Creates a context for a transform over a violation.
|
protected UndoableEditCommand |
createUndoableEditCommand(TextTransformContext context) |
void |
endTransform(TransformContext context)
Ends a transform of this type.
|
protected TextBuffer |
getBuffer() |
java.lang.Class<? extends TransformContext> |
getContextClass()
Gets the class of the context created by
TransformAdapter.createContext(oracle.jdeveloper.audit.transform.Transform, oracle.jdeveloper.audit.service.Violation, oracle.jdeveloper.audit.model.Location) . |
addHighlight, addRemovedHighlight, beginTransform, beginTransformSequence, cancelTransformSequence, endTransformSequence, equals, getDeferredCommands, getHighlightRegions, getSelection, hashCode, invokeLater, isTransformable, isTransformable, makeTransformable, makeWritable, setPredecessorApplyData, setSelection, setSelection
public java.lang.Class<? extends TransformContext> getContextClass()
TransformAdapter
TransformAdapter.createContext(oracle.jdeveloper.audit.transform.Transform, oracle.jdeveloper.audit.service.Violation, oracle.jdeveloper.audit.model.Location)
.getContextClass
in class TransformAdapter
public TransformContext createContext(Transform transform, Violation violation, Location location)
TransformAdapter
createContext
in class TransformAdapter
public void beginTransform(TransformContext context)
CommandProcessor.beginTrans(java.lang.String)
has been
invoked to start a command processor batch operation;
TransformAdapter.beginTransformSequence(oracle.jdeveloper.audit.transform.TransformSequenceContext)
method has been invoked;
The TextTransformAdapter
implementation of this method acquires
and write locks the text buffer containing the text to transform.
beginTransform
in class TransformAdapter
context
- protected UndoableEditCommand createUndoableEditCommand(TextTransformContext context)
protected TextBuffer getBuffer()
public void endTransform(TransformContext context) throws java.lang.Exception
TransformAdapter.beginTransform(oracle.jdeveloper.audit.transform.TransformContext)
has been invoked (its preconditions still
hold);
The TextTransformAdapter
implementation of this method creates
an UndoableEditCommand
for the edits, invokes it, and unlocks and
releases the text buffer.
endTransform
in class TransformAdapter
context
- A transform context created by this adapter.java.lang.Exception
public void cancelTransform(TransformContext context) throws java.lang.Exception
TransformAdapter.beginTransform(oracle.jdeveloper.audit.transform.TransformContext)
has been invoked (its preconditions still
hold);
TransformAdapter.endTransform(oracle.jdeveloper.audit.transform.TransformContext)
method has thrown an
exception.
The TextTransformAdapter
implementation of this method unlocks and
releases the text buffer.
cancelTransform
in class TransformAdapter
context
- A transform context created by this type.java.lang.Exception