Find an action with the given name in the editor kit.
editorKit - non-null editor kit in which search is performed.
actionName - non-null action name to search for.
action instance with the given name or null if action not found.
public static void addCaretUndoableEdit(Document doc,
Add an undoable edit describing current state of caret(s) during document's atomic section.
This method is typically called at the beginning of the atomic section over the document
so that a subsequent undo would restore original caret offsets that were not yet modified
by the actual changes performed during the atomic section.
The method may also be called at the end of the atomic section
in case the atomic section performed explicit caret movements.
The created undoable edit will be added to document's compound undoable edit created for the atomic section.
That edit will be fired by the document to an undo manager's listener upon completion of the atomic section.
Therefore the document should adhere to CustomUndoDocument otherwise the method would do nothing.
doc - document to which the created undoable edit will be added.
Null may be passed then the method has no effect.
caret - non-null caret which state should be stored