In This Article

EditActionBase Class

Provides a base implementation for an edit action that can be performed in an IEditorView.

public abstract class EditActionBase : Command, IEditAction, IKeyedObject
Inheritance:
object Command object
Derived:
AddNextOccurrenceToSelectionAction ApplyDefaultOutliningExpansionAction BackspaceAction BackspaceToPreviousWordAction CancelMacroRecordingAction ChangeCharacterCasingAction CodeBlockSelectionContractAction CodeBlockSelectionExpandAction CollapseSelectionAction CollapseSelectionLeftAction CollapseSelectionRightAction CollapseToDefinitionsAction CommentLinesAction ConvertSpacesToTabsAction ConvertTabsToSpacesAction CopyToClipboardAction CutLineToClipboardAction CutToClipboardAction DeleteAction DeleteBlankLinesAction DeleteHorizontalWhitespaceAction DeleteLineAction DeleteToLineEndAction DeleteToLineStartAction DeleteToNextWordAction DuplicateAction ExpandAllOutliningAction FormatDocumentAction FormatSelectionAction HideSelectionAction IncrementalSearchAction IndentAction InsertLineBreakAction MacroAction MoveDownAction MoveLeftAction MovePageDownAction MovePageUpAction MoveRightAction MoveSelectedLinesDownAction MoveSelectedLinesUpAction MoveToDocumentEndAction MoveToDocumentStartAction MoveToLineEndAction MoveToLineStartAction MoveToLineStartAfterIndentationAction MoveToMatchingBracketAction MoveToNextLineStartAfterIndentationAction MoveToNextWordAction MoveToPreviousLineStartAfterIndentationAction MoveToPreviousWordAction MoveToVisibleBottomAction MoveToVisibleTopAction MoveUpAction OpenLineAboveAction OpenLineBelowAction OutdentAction PasteFromClipboardAction PauseResumeMacroRecordingAction RedoAction RequestIntelliPromptAutoCompleteAction RequestIntelliPromptCompletionSessionAction RequestIntelliPromptInsertSnippetSessionAction RequestIntelliPromptParameterInfoSessionAction RequestIntelliPromptQuickInfoSessionAction RequestIntelliPromptSurroundWithSessionAction ReverseIncrementalSearchAction RunMacroAction ScrollDownAction ScrollLeftAction ScrollLineToVisibleBottomAction ScrollLineToVisibleMiddleAction ScrollLineToVisibleTopAction ScrollPageDownAction ScrollPageUpAction ScrollRightAction ScrollToDocumentEndAction ScrollToDocumentStartAction ScrollUpAction SearchActionBase SelectAllAction SelectBlockDownAction SelectBlockLeftAction SelectBlockRightAction SelectBlockToNextWordAction SelectBlockToPreviousWordAction SelectBlockUpAction SelectDownAction SelectLeftAction SelectPageDownAction SelectPageUpAction SelectRightAction SelectToDocumentEndAction SelectToDocumentStartAction SelectToLineEndAction SelectToLineStartAction SelectToLineStartAfterIndentationAction SelectToMatchingBracketAction SelectToNextWordAction SelectToPreviousWordAction SelectToVisibleBottomAction SelectToVisibleTopAction SelectUpAction SelectWordAction StartAutomaticOutliningAction StopHidingCurrentAction StopOutliningAction TabifySelectedLinesAction ToggleAllOutliningExpansionAction ToggleMacroRecordingAction ToggleOutliningExpansionAction ToggleOverwriteModeAction TransposeCharactersAction TransposeLinesAction TransposeWordsAction TrimAllTrailingWhitespaceAction TrimTrailingWhitespaceAction TypingAction UncommentLinesAction UndoAction UntabifySelectedLinesAction
Implements:
IEditAction IKeyedObject

Constructors

EditActionBase(string)

Initializes an instance of the EditActionBase class.

protected EditActionBase(string text)
Parameter Type Description
text string

The command text.

Properties

CanRecordInMacro

Gets whether the action can be recorded in a macro.

public virtual bool CanRecordInMacro { get; }

Property Value

bool:

true if the action can be recorded in a macro; otherwise, false.

Key

Gets the string key that uniquely identifies the edit action.

public virtual string Key { get; }

Property Value

string:

The string key that uniquely identifies the edit action.

Text

Gets the command text.

public string Text { get; }

Property Value

string:

The command text.

Methods

CanExecute(IEditorView)

Returns whether the edit action can execute in the specified IEditorView.

public virtual bool CanExecute(IEditorView view)
Parameter Type Description
view IEditorView

The IEditorView to examine.

Returns

bool:

true if the edit action can execute in the specified IEditorView; otherwise, false.

Execute(IEditorView)

Executes the edit action in the specified IEditorView.

public abstract void Execute(IEditorView view)
Parameter Type Description
view IEditorView

The IEditorView in which to execute the edit action.

GetKeyText(Keys, Keys)

Gets the string version of a keyboard shortcut.

public static string GetKeyText(Keys modifiers, Keys key)
Parameter Type Description
modifiers Keys

The Keys to examine.

key Keys

The Keys to examine.

Returns

string:

The string version of a keyboard shortcut.

ReadFromXml(XmlReader)

Deserializes the data for the IEditAction from XML.

public virtual void ReadFromXml(XmlReader reader)
Parameter Type Description
reader XmlReader

The System.Xml.XmlReader to use.

Remarks

This method is used for macro serialization.

WriteToXml(XmlWriter)

Serializes the data for the IEditAction to XML.

public virtual void WriteToXml(XmlWriter writer)
Parameter Type Description
writer XmlWriter

The System.Xml.XmlWriter to use.

Remarks

This method is used for macro serialization.

Inherited Members