C# Class dnSpy.Text.Operations.ReplEditorOperations

Inheritance: IReplEditorOperations
Show file Open project: 0xd4d/dnSpy Class Usage Examples

Private Properties

Property Type Description
GetLineBreak string
GetLineBreak string
GetNewString string
GetNormalizedSpansToReplaceWithText IEnumerable
HandleEnter bool
UpdateCaretForEdit bool

Public Methods

Method Description
AddAfterTextBufferChangePrimitive ( ) : void
AddBeforeTextBufferChangePrimitive ( ) : void
AddUserInput ( Span span, string text, bool clearSearchText = true ) : void
AddUserInput ( string text, bool clearSearchText = true ) : void
Backspace ( ) : bool
Capitalize ( ) : bool
ClearInput ( ) : void
ClearScreen ( ) : void
ConvertSpacesToTabs ( ) : bool
ConvertTabsToSpaces ( ) : bool
CopyCode ( ) : void
CopySelection ( ) : bool
CutFullLine ( ) : bool
CutSelection ( ) : bool
DecreaseLineIndent ( ) : bool
Delete ( ) : bool
DeleteBlankLines ( ) : bool
DeleteFullLine ( ) : bool
DeleteHorizontalWhiteSpace ( ) : bool
DeleteToBeginningOfLine ( ) : bool
DeleteToEndOfLine ( ) : bool
DeleteWordToLeft ( ) : bool
DeleteWordToRight ( ) : bool
ExtendSelection ( int newEnd ) : void
GetWhitespaceForVirtualSpace ( VirtualSnapshotPoint point ) : string
GotoLine ( int lineNumber ) : void
IncreaseLineIndent ( ) : bool
Indent ( ) : bool
InsertFile ( string filePath ) : bool
InsertFinalNewLine ( ) : bool
InsertNewLine ( ) : bool
InsertNewLineDontSubmit ( ) : bool
InsertProvisionalText ( string text ) : bool
InsertText ( string text ) : bool
InsertTextAsBox ( string text, VirtualSnapshotPoint &boxStart, VirtualSnapshotPoint &boxEnd ) : bool
MakeLowercase ( ) : bool
MakeUppercase ( ) : bool
MoveCaret ( ITextViewLine textLine, double horizontalOffset, bool extendSelection ) : void
MoveCurrentLineToBottom ( ) : void
MoveCurrentLineToTop ( ) : void
MoveLineDown ( bool extendSelection ) : void
MoveLineUp ( bool extendSelection ) : void
MoveSelectedLinesDown ( ) : bool
MoveSelectedLinesUp ( ) : bool
MoveToBottomOfView ( bool extendSelection ) : void
MoveToEndOfDocument ( bool extendSelection ) : void
MoveToEndOfLine ( bool extendSelection ) : void
MoveToHome ( bool extendSelection ) : void
MoveToLastNonWhiteSpaceCharacter ( bool extendSelection ) : void
MoveToNextCharacter ( bool extendSelection ) : void
MoveToNextWord ( bool extendSelection ) : void
MoveToPreviousCharacter ( bool extendSelection ) : void
MoveToPreviousWord ( bool extendSelection ) : void
MoveToStartOfDocument ( bool extendSelection ) : void
MoveToStartOfLine ( bool extendSelection ) : void
MoveToStartOfLineAfterWhiteSpace ( bool extendSelection ) : void
MoveToStartOfNextLineAfterWhiteSpace ( bool extendSelection ) : void
MoveToStartOfPreviousLineAfterWhiteSpace ( bool extendSelection ) : void
MoveToTopOfView ( bool extendSelection ) : void
NormalizeLineEndings ( string replacement ) : bool
OpenLineAbove ( ) : bool
OpenLineBelow ( ) : bool
PageDown ( bool extendSelection ) : void
PageUp ( bool extendSelection ) : void
Paste ( ) : bool
ReplEditorOperations ( IReplEditor2 replEditor, IWpfTextView wpfTextView, IEditorOperationsFactoryService editorOperationsFactoryService ) : System
ReplaceAllMatches ( string searchText, string replaceText, bool matchCase, bool matchWholeWord, bool useRegularExpressions ) : int
ReplaceSelection ( string text ) : bool
ReplaceText ( Span replaceSpan, string text ) : bool
Reset ( ) : void
ResetSelection ( ) : void
ScrollColumnLeft ( ) : void
ScrollColumnRight ( ) : void
ScrollDownAndMoveCaretIfNecessary ( ) : void
ScrollLineBottom ( ) : void
ScrollLineCenter ( ) : void
ScrollLineTop ( ) : void
ScrollPageDown ( ) : void
ScrollPageUp ( ) : void
ScrollUpAndMoveCaretIfNecessary ( ) : void
Select ( int start, int end ) : void
SelectAll ( ) : void
SelectAndMoveCaret ( VirtualSnapshotPoint anchorPoint, VirtualSnapshotPoint activePoint ) : void
SelectAndMoveCaret ( VirtualSnapshotPoint anchorPoint, VirtualSnapshotPoint activePoint, TextSelectionMode selectionMode ) : void
SelectAndMoveCaret ( VirtualSnapshotPoint anchorPoint, VirtualSnapshotPoint activePoint, TextSelectionMode selectionMode, EnsureSpanVisibleOptions scrollOptions ) : void
SelectCurrentWord ( ) : void
SelectEnclosing ( ) : void
SelectFirstChild ( ) : void
SelectLine ( ITextViewLine viewLine, bool extendSelection ) : void
SelectNextCommand ( ) : void
SelectNextSibling ( bool extendSelection ) : void
SelectPreviousCommand ( ) : void
SelectPreviousSibling ( bool extendSelection ) : void
SelectSameTextNextCommand ( ) : void
SelectSameTextPreviousCommand ( ) : void
Submit ( ) : bool
SwapCaretAndAnchor ( ) : void
Tabify ( ) : bool
ToggleCase ( ) : bool
TransposeCharacter ( ) : bool
TransposeLine ( ) : bool
TransposeWord ( ) : bool
TrimTrailingWhiteSpace ( ) : bool
Unindent ( ) : bool
Untabify ( ) : bool
ZoomIn ( ) : void
ZoomOut ( ) : void
ZoomTo ( double zoomLevel ) : void

Private Methods

Method Description
GetLineBreak ( ) : string
GetLineBreak ( SnapshotPoint pos ) : string
GetNewString ( string s ) : string
GetNormalizedSpansToReplaceWithText ( ) : IEnumerable
HandleEnter ( bool force ) : bool
UpdateCaretForEdit ( ) : bool

Returns false if the caret isn't within the editing area. If the caret is within the prompt or continue text (eg. first two chars of the line), then the caret is moved to the first character after that text.

Method Details

AddAfterTextBufferChangePrimitive() public method

public AddAfterTextBufferChangePrimitive ( ) : void
return void

AddBeforeTextBufferChangePrimitive() public method

public AddBeforeTextBufferChangePrimitive ( ) : void
return void

AddUserInput() public method

public AddUserInput ( Span span, string text, bool clearSearchText = true ) : void
span Span
text string
clearSearchText bool
return void

AddUserInput() public method

public AddUserInput ( string text, bool clearSearchText = true ) : void
text string
clearSearchText bool
return void

Backspace() public method

public Backspace ( ) : bool
return bool

Capitalize() public method

public Capitalize ( ) : bool
return bool

ClearInput() public method

public ClearInput ( ) : void
return void

ClearScreen() public method

public ClearScreen ( ) : void
return void

ConvertSpacesToTabs() public method

public ConvertSpacesToTabs ( ) : bool
return bool

ConvertTabsToSpaces() public method

public ConvertTabsToSpaces ( ) : bool
return bool

CopyCode() public method

public CopyCode ( ) : void
return void

CopySelection() public method

public CopySelection ( ) : bool
return bool

CutFullLine() public method

public CutFullLine ( ) : bool
return bool

CutSelection() public method

public CutSelection ( ) : bool
return bool

DecreaseLineIndent() public method

public DecreaseLineIndent ( ) : bool
return bool

Delete() public method

public Delete ( ) : bool
return bool

DeleteBlankLines() public method

public DeleteBlankLines ( ) : bool
return bool

DeleteFullLine() public method

public DeleteFullLine ( ) : bool
return bool

DeleteHorizontalWhiteSpace() public method

public DeleteHorizontalWhiteSpace ( ) : bool
return bool

DeleteToBeginningOfLine() public method

public DeleteToBeginningOfLine ( ) : bool
return bool

DeleteToEndOfLine() public method

public DeleteToEndOfLine ( ) : bool
return bool

DeleteWordToLeft() public method

public DeleteWordToLeft ( ) : bool
return bool

DeleteWordToRight() public method

public DeleteWordToRight ( ) : bool
return bool

ExtendSelection() public method

public ExtendSelection ( int newEnd ) : void
newEnd int
return void

GetWhitespaceForVirtualSpace() public method

public GetWhitespaceForVirtualSpace ( VirtualSnapshotPoint point ) : string
point VirtualSnapshotPoint
return string

GotoLine() public method

public GotoLine ( int lineNumber ) : void
lineNumber int
return void

IncreaseLineIndent() public method

public IncreaseLineIndent ( ) : bool
return bool

Indent() public method

public Indent ( ) : bool
return bool

InsertFile() public method

public InsertFile ( string filePath ) : bool
filePath string
return bool

InsertFinalNewLine() public method

public InsertFinalNewLine ( ) : bool
return bool

InsertNewLine() public method

public InsertNewLine ( ) : bool
return bool

InsertNewLineDontSubmit() public method

public InsertNewLineDontSubmit ( ) : bool
return bool

InsertProvisionalText() public method

public InsertProvisionalText ( string text ) : bool
text string
return bool

InsertText() public method

public InsertText ( string text ) : bool
text string
return bool

InsertTextAsBox() public method

public InsertTextAsBox ( string text, VirtualSnapshotPoint &boxStart, VirtualSnapshotPoint &boxEnd ) : bool
text string
boxStart VirtualSnapshotPoint
boxEnd VirtualSnapshotPoint
return bool

MakeLowercase() public method

public MakeLowercase ( ) : bool
return bool

MakeUppercase() public method

public MakeUppercase ( ) : bool
return bool

MoveCaret() public method

public MoveCaret ( ITextViewLine textLine, double horizontalOffset, bool extendSelection ) : void
textLine ITextViewLine
horizontalOffset double
extendSelection bool
return void

MoveCurrentLineToBottom() public method

public MoveCurrentLineToBottom ( ) : void
return void

MoveCurrentLineToTop() public method

public MoveCurrentLineToTop ( ) : void
return void

MoveLineDown() public method

public MoveLineDown ( bool extendSelection ) : void
extendSelection bool
return void

MoveLineUp() public method

public MoveLineUp ( bool extendSelection ) : void
extendSelection bool
return void

MoveSelectedLinesDown() public method

public MoveSelectedLinesDown ( ) : bool
return bool

MoveSelectedLinesUp() public method

public MoveSelectedLinesUp ( ) : bool
return bool

MoveToBottomOfView() public method

public MoveToBottomOfView ( bool extendSelection ) : void
extendSelection bool
return void

MoveToEndOfDocument() public method

public MoveToEndOfDocument ( bool extendSelection ) : void
extendSelection bool
return void

MoveToEndOfLine() public method

public MoveToEndOfLine ( bool extendSelection ) : void
extendSelection bool
return void

MoveToHome() public method

public MoveToHome ( bool extendSelection ) : void
extendSelection bool
return void

MoveToLastNonWhiteSpaceCharacter() public method

public MoveToLastNonWhiteSpaceCharacter ( bool extendSelection ) : void
extendSelection bool
return void

MoveToNextCharacter() public method

public MoveToNextCharacter ( bool extendSelection ) : void
extendSelection bool
return void

MoveToNextWord() public method

public MoveToNextWord ( bool extendSelection ) : void
extendSelection bool
return void

MoveToPreviousCharacter() public method

public MoveToPreviousCharacter ( bool extendSelection ) : void
extendSelection bool
return void

MoveToPreviousWord() public method

public MoveToPreviousWord ( bool extendSelection ) : void
extendSelection bool
return void

MoveToStartOfDocument() public method

public MoveToStartOfDocument ( bool extendSelection ) : void
extendSelection bool
return void

MoveToStartOfLine() public method

public MoveToStartOfLine ( bool extendSelection ) : void
extendSelection bool
return void

MoveToStartOfLineAfterWhiteSpace() public method

public MoveToStartOfLineAfterWhiteSpace ( bool extendSelection ) : void
extendSelection bool
return void

MoveToStartOfNextLineAfterWhiteSpace() public method

public MoveToStartOfNextLineAfterWhiteSpace ( bool extendSelection ) : void
extendSelection bool
return void

MoveToStartOfPreviousLineAfterWhiteSpace() public method

public MoveToStartOfPreviousLineAfterWhiteSpace ( bool extendSelection ) : void
extendSelection bool
return void

MoveToTopOfView() public method

public MoveToTopOfView ( bool extendSelection ) : void
extendSelection bool
return void

NormalizeLineEndings() public method

public NormalizeLineEndings ( string replacement ) : bool
replacement string
return bool

OpenLineAbove() public method

public OpenLineAbove ( ) : bool
return bool

OpenLineBelow() public method

public OpenLineBelow ( ) : bool
return bool

PageDown() public method

public PageDown ( bool extendSelection ) : void
extendSelection bool
return void

PageUp() public method

public PageUp ( bool extendSelection ) : void
extendSelection bool
return void

Paste() public method

public Paste ( ) : bool
return bool

ReplEditorOperations() public method

public ReplEditorOperations ( IReplEditor2 replEditor, IWpfTextView wpfTextView, IEditorOperationsFactoryService editorOperationsFactoryService ) : System
replEditor IReplEditor2
wpfTextView IWpfTextView
editorOperationsFactoryService IEditorOperationsFactoryService
return System

ReplaceAllMatches() public method

public ReplaceAllMatches ( string searchText, string replaceText, bool matchCase, bool matchWholeWord, bool useRegularExpressions ) : int
searchText string
replaceText string
matchCase bool
matchWholeWord bool
useRegularExpressions bool
return int

ReplaceSelection() public method

public ReplaceSelection ( string text ) : bool
text string
return bool

ReplaceText() public method

public ReplaceText ( Span replaceSpan, string text ) : bool
replaceSpan Span
text string
return bool

Reset() public method

public Reset ( ) : void
return void

ResetSelection() public method

public ResetSelection ( ) : void
return void

ScrollColumnLeft() public method

public ScrollColumnLeft ( ) : void
return void

ScrollColumnRight() public method

public ScrollColumnRight ( ) : void
return void

ScrollDownAndMoveCaretIfNecessary() public method

public ScrollDownAndMoveCaretIfNecessary ( ) : void
return void

ScrollLineBottom() public method

public ScrollLineBottom ( ) : void
return void

ScrollLineCenter() public method

public ScrollLineCenter ( ) : void
return void

ScrollLineTop() public method

public ScrollLineTop ( ) : void
return void

ScrollPageDown() public method

public ScrollPageDown ( ) : void
return void

ScrollPageUp() public method

public ScrollPageUp ( ) : void
return void

ScrollUpAndMoveCaretIfNecessary() public method

public ScrollUpAndMoveCaretIfNecessary ( ) : void
return void

Select() public method

public Select ( int start, int end ) : void
start int
end int
return void

SelectAll() public method

public SelectAll ( ) : void
return void

SelectAndMoveCaret() public method

public SelectAndMoveCaret ( VirtualSnapshotPoint anchorPoint, VirtualSnapshotPoint activePoint ) : void
anchorPoint VirtualSnapshotPoint
activePoint VirtualSnapshotPoint
return void

SelectAndMoveCaret() public method

public SelectAndMoveCaret ( VirtualSnapshotPoint anchorPoint, VirtualSnapshotPoint activePoint, TextSelectionMode selectionMode ) : void
anchorPoint VirtualSnapshotPoint
activePoint VirtualSnapshotPoint
selectionMode TextSelectionMode
return void

SelectAndMoveCaret() public method

public SelectAndMoveCaret ( VirtualSnapshotPoint anchorPoint, VirtualSnapshotPoint activePoint, TextSelectionMode selectionMode, EnsureSpanVisibleOptions scrollOptions ) : void
anchorPoint VirtualSnapshotPoint
activePoint VirtualSnapshotPoint
selectionMode TextSelectionMode
scrollOptions EnsureSpanVisibleOptions
return void

SelectCurrentWord() public method

public SelectCurrentWord ( ) : void
return void

SelectEnclosing() public method

public SelectEnclosing ( ) : void
return void

SelectFirstChild() public method

public SelectFirstChild ( ) : void
return void

SelectLine() public method

public SelectLine ( ITextViewLine viewLine, bool extendSelection ) : void
viewLine ITextViewLine
extendSelection bool
return void

SelectNextCommand() public method

public SelectNextCommand ( ) : void
return void

SelectNextSibling() public method

public SelectNextSibling ( bool extendSelection ) : void
extendSelection bool
return void

SelectPreviousCommand() public method

public SelectPreviousCommand ( ) : void
return void

SelectPreviousSibling() public method

public SelectPreviousSibling ( bool extendSelection ) : void
extendSelection bool
return void

SelectSameTextNextCommand() public method

public SelectSameTextNextCommand ( ) : void
return void

SelectSameTextPreviousCommand() public method

public SelectSameTextPreviousCommand ( ) : void
return void

Submit() public method

public Submit ( ) : bool
return bool

SwapCaretAndAnchor() public method

public SwapCaretAndAnchor ( ) : void
return void

Tabify() public method

public Tabify ( ) : bool
return bool

ToggleCase() public method

public ToggleCase ( ) : bool
return bool

TransposeCharacter() public method

public TransposeCharacter ( ) : bool
return bool

TransposeLine() public method

public TransposeLine ( ) : bool
return bool

TransposeWord() public method

public TransposeWord ( ) : bool
return bool

TrimTrailingWhiteSpace() public method

public TrimTrailingWhiteSpace ( ) : bool
return bool

Unindent() public method

public Unindent ( ) : bool
return bool

Untabify() public method

public Untabify ( ) : bool
return bool

ZoomIn() public method

public ZoomIn ( ) : void
return void

ZoomOut() public method

public ZoomOut ( ) : void
return void

ZoomTo() public method

public ZoomTo ( double zoomLevel ) : void
zoomLevel double
return void