C# Class dnSpy.Text.Operations.EditorOperations

Inheritance: IEditorOperations3
ファイルを表示 Open project: 0xd4d/dnSpy Class Usage Examples

Private Properties

Property Type Description
CopyToClipboard bool
CutDeleteFullLine bool
CutOrCopySelection bool
DeleteOrBackspace bool
GetAnchorPositionOrCaretIfNoSelection VirtualSnapshotPoint
GetBottomFullyVisibleLine ITextViewLine
GetDefaultHorizontalWhitespaceSpan Span
GetFirstWhitespaceIndexForIndentReplace int
GetHorizontalWhiteSpaceSpans IEnumerable
GetLengthOfLineWithTabsConvertedToSpaces int
GetLengthOfLineWithTabsConvertedToSpaces int
GetLineBreak string
GetNextIndentedVisualColumn int
GetNextNonVirtualCaretPosition SnapshotPoint
GetPointOfRightWord SnapshotPoint
GetSelectionOrCaretIfNoSelection VirtualSnapshotSpan
GetSpanOfLeftWord SnapshotSpan
GetTopFullyVisibleLine ITextViewLine
GetWhitespaceForVirtualSpace string
GetWords IEnumerable
GetZoomableView IWpfTextView
Indent bool
IndentLine bool
IndentLine bool
IndentMultipleLines bool
IndentMultipleLines bool
InsertText bool
InsertText bool
IsSelected bool
IsWhitespace bool
OpenLine bool
SkipWhitespace SnapshotPoint
SkipWhitespaceEOL SnapshotPoint
ToVisualColumn int
TryCreateHtmlText string
TryCreateHtmlText string
TryGetIndexOfFirstNonWhitespace int
TryGetPreviousSignificantWord TextExtent
UpperLower bool
UseGlobalZoomLevelOption bool

Public Methods

Method Description
AddAfterTextBufferChangePrimitive ( ) : void
AddBeforeTextBufferChangePrimitive ( ) : void
Backspace ( ) : bool
Capitalize ( ) : bool
ConvertSpacesToTabs ( ) : bool
ConvertTabsToSpaces ( ) : bool
CopySelection ( ) : bool
CutFullLine ( ) : bool
CutSelection ( ) : bool
DecreaseLineIndent ( ) : bool
Delete ( ) : bool
DeleteBlankLines ( ) : bool
DeleteFullLine ( ) : bool
DeleteHorizontalWhiteSpace ( ) : bool
DeleteSelection ( ) : void
DeleteToBeginningOfLine ( ) : bool
DeleteToEndOfLine ( ) : bool
DeleteWordToLeft ( ) : bool
DeleteWordToRight ( ) : bool
EditorOperations ( ITextView textView, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService, ISmartIndentationService smartIndentationService, IHtmlBuilderService htmlBuilderService ) : System
ExtendSelection ( int newEnd ) : void
GetSelectionOrCaretIfNoSelection ( VirtualSnapshotPoint &anchorPoint, VirtualSnapshotPoint &activePoint ) : void
GetWhitespaceForVirtualSpace ( VirtualSnapshotPoint point ) : string
GotoLine ( int lineNumber ) : void
IncreaseLineIndent ( ) : bool
Indent ( ) : bool
InsertFile ( string filePath ) : bool
InsertFinalNewLine ( ) : bool
InsertNewLine ( ) : 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 ( ITextViewLine line, bool extendSelection ) : void
MoveToStartOfLineAfterWhiteSpace ( bool extendSelection ) : void
MoveToStartOfNextLineAfterWhiteSpace ( bool extendSelection ) : void
MoveToStartOfPreviousLineAfterWhiteSpace ( bool extendSelection ) : void
MoveToTopOfView ( bool extendSelection ) : void
NormalizeLineEndings ( string replacement ) : bool
OnContentTypeChanged ( object sender, TextDataModelContentTypeChangedEventArgs e ) : void
OpenLineAbove ( ) : bool
OpenLineBelow ( ) : bool
PageDown ( bool extendSelection ) : void
PageUp ( bool extendSelection ) : void
Paste ( ) : bool
ReplaceAllMatches ( string searchText, string replaceText, bool matchCase, bool matchWholeWord, bool useRegularExpressions ) : int
ReplaceSelection ( string text ) : bool
ReplaceText ( Span replaceSpan, string text ) : bool
ResetSelection ( ) : void
ScrollAndMoveCaretIfNecessary ( ScrollDirection scrollDirection ) : void
ScrollColumnLeft ( ) : void
ScrollColumnRight ( ) : void
ScrollDownAndMoveCaretIfNecessary ( ) : void
ScrollLineBottom ( ) : void
ScrollLineCenter ( ) : void
ScrollLineTop ( ) : void
ScrollPageDown ( ) : void
ScrollPageUp ( ) : void
ScrollUpAndMoveCaretIfNecessary ( ) : void
SelectAll ( ) : void
SelectAndMove ( SnapshotSpan span ) : 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
SelectNextSibling ( bool extendSelection ) : void
SelectPreviousSibling ( bool extendSelection ) : void
SetZoom ( IWpfTextView wpfTextView, double newZoom ) : void
SwapCaretAndAnchor ( ) : void
Tabify ( ) : bool
TextView_Closed ( object sender, EventArgs e ) : void
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
CopyToClipboard ( string text, string htmlText, bool isFullLineData, bool isBoxData ) : bool
CutDeleteFullLine ( bool cut ) : bool
CutOrCopySelection ( bool cut ) : bool
DeleteOrBackspace ( bool isBackspace ) : bool
GetAnchorPositionOrCaretIfNoSelection ( ) : VirtualSnapshotPoint
GetBottomFullyVisibleLine ( ) : ITextViewLine
GetDefaultHorizontalWhitespaceSpan ( SnapshotPoint point ) : Span
GetFirstWhitespaceIndexForIndentReplace ( string s, int index ) : int
GetHorizontalWhiteSpaceSpans ( ITextSnapshot snapshot, Span span ) : IEnumerable
GetLengthOfLineWithTabsConvertedToSpaces ( string line ) : int
GetLengthOfLineWithTabsConvertedToSpaces ( string line, int length ) : int
GetLineBreak ( SnapshotPoint pos ) : string
GetNextIndentedVisualColumn ( int visualColumn ) : int
GetNextNonVirtualCaretPosition ( ) : SnapshotPoint
GetPointOfRightWord ( VirtualSnapshotPoint point ) : SnapshotPoint
GetSelectionOrCaretIfNoSelection ( ) : VirtualSnapshotSpan
GetSpanOfLeftWord ( VirtualSnapshotPoint point ) : SnapshotSpan
GetTopFullyVisibleLine ( ) : ITextViewLine
GetWhitespaceForVirtualSpace ( int lineLengthNoTabs, int virtualSpaces ) : string
GetWords ( SnapshotSpan span ) : IEnumerable
GetZoomableView ( ) : IWpfTextView
Indent ( VirtualSnapshotPoint vpos ) : bool
IndentLine ( ITextEdit ed, ITextSnapshotLine line, string lineString, VirtualSnapshotPoint vpos, bool onlyAddIndentSize, bool isOverwrite ) : bool
IndentLine ( ITextEdit ed, VirtualSnapshotPoint vpos, bool isOverwrite ) : bool
IndentMultipleLines ( ) : bool
IndentMultipleLines ( ITextEdit ed, VirtualSnapshotSpan vspan ) : bool
InsertText ( string text, bool isProvisional ) : bool
InsertText ( string text, bool isProvisional, bool overwriteMode ) : bool
IsSelected ( SnapshotSpan span ) : bool
IsWhitespace ( char c ) : bool
OpenLine ( SnapshotPoint linebreakPos, SnapshotPoint insertPos, bool forward ) : bool
SkipWhitespace ( ITextViewLine line ) : SnapshotPoint
SkipWhitespaceEOL ( ITextViewLine line ) : SnapshotPoint
ToVisualColumn ( string line, int virtualIndex ) : int
TryCreateHtmlText ( NormalizedSnapshotSpanCollection spans ) : string
TryCreateHtmlText ( SnapshotSpan span ) : string
TryGetIndexOfFirstNonWhitespace ( string s ) : int
TryGetPreviousSignificantWord ( TextExtent info ) : TextExtent
UpperLower ( bool upper ) : bool
UseGlobalZoomLevelOption ( ITextView textView ) : bool

Method Details

AddAfterTextBufferChangePrimitive() public method

public AddAfterTextBufferChangePrimitive ( ) : void
return void

AddBeforeTextBufferChangePrimitive() public method

public AddBeforeTextBufferChangePrimitive ( ) : void
return void

Backspace() public method

public Backspace ( ) : bool
return bool

Capitalize() public method

public Capitalize ( ) : bool
return bool

ConvertSpacesToTabs() public method

public ConvertSpacesToTabs ( ) : bool
return bool

ConvertTabsToSpaces() public method

public ConvertTabsToSpaces ( ) : bool
return bool

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

DeleteSelection() public method

public DeleteSelection ( ) : void
return void

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

EditorOperations() public method

public EditorOperations ( ITextView textView, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService, ISmartIndentationService smartIndentationService, IHtmlBuilderService htmlBuilderService ) : System
textView ITextView
textStructureNavigatorSelectorService ITextStructureNavigatorSelectorService
smartIndentationService ISmartIndentationService
htmlBuilderService IHtmlBuilderService
return System

ExtendSelection() public method

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

GetSelectionOrCaretIfNoSelection() public method

public GetSelectionOrCaretIfNoSelection ( VirtualSnapshotPoint &anchorPoint, VirtualSnapshotPoint &activePoint ) : void
anchorPoint VirtualSnapshotPoint
activePoint VirtualSnapshotPoint
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

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 ( ITextViewLine line, bool extendSelection ) : void
line ITextViewLine
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

OnContentTypeChanged() public method

public OnContentTypeChanged ( object sender, TextDataModelContentTypeChangedEventArgs e ) : void
sender object
e TextDataModelContentTypeChangedEventArgs
return void

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

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

ResetSelection() public method

public ResetSelection ( ) : void
return void

ScrollAndMoveCaretIfNecessary() public method

public ScrollAndMoveCaretIfNecessary ( ScrollDirection scrollDirection ) : void
scrollDirection ScrollDirection
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

SelectAll() public method

public SelectAll ( ) : void
return void

SelectAndMove() public method

public SelectAndMove ( SnapshotSpan span ) : void
span SnapshotSpan
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

SelectNextSibling() public method

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

SelectPreviousSibling() public method

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

SetZoom() public method

public SetZoom ( IWpfTextView wpfTextView, double newZoom ) : void
wpfTextView IWpfTextView
newZoom double
return void

SwapCaretAndAnchor() public method

public SwapCaretAndAnchor ( ) : void
return void

Tabify() public method

public Tabify ( ) : bool
return bool

TextView_Closed() public method

public TextView_Closed ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

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