Allows you to manipulate text as data in text buffers.
Namespace: EnvDTE80
Assembly: EnvDTE80 (in EnvDTE80.dll)
Syntax
'Declaration
<GuidAttribute("136AFA9F-F243-4ABB-A8F8-4C2D26C47163")> _
Public Interface EditPoint2 _
Inherits EditPoint
[GuidAttribute("136AFA9F-F243-4ABB-A8F8-4C2D26C47163")]
public interface EditPoint2 : EditPoint
[GuidAttribute(L"136AFA9F-F243-4ABB-A8F8-4C2D26C47163")]
public interface class EditPoint2 : EditPoint
[<GuidAttribute("136AFA9F-F243-4ABB-A8F8-4C2D26C47163")>]
type EditPoint2 =
interface
interface EditPoint
end
public interface EditPoint2 extends EditPoint
The EditPoint2 type exposes the following members.
Properties
Name | Description | |
---|---|---|
![]() |
AbsoluteCharOffset | Gets the one-based character offset from the beginning of the document to the EditPoint2 object. |
![]() |
AtEndOfDocument | Gets a value indicating whether or not the object is at the end of the document. |
![]() |
AtEndOfLine | Gets a value indicating whether or not the object is at the end of a line. |
![]() |
AtStartOfDocument | Gets a value indicating whether or not the object is at the beginning of the document. |
![]() |
AtStartOfLine | Gets a value indicating whether or not the EditPoint object is at the beginning of a line. |
![]() |
CodeElement | Gets the code element at the EditPoint ___location. |
![]() |
DisplayColumn | Gets the number of the currently displayed column containing the EditPoint object. |
![]() |
DTE | Returns the top-level extensibility object. |
![]() |
Line | Gets the line number of the EditPoint object. |
![]() |
LineCharOffset | Gets the character offset of the EditPoint object. |
![]() |
LineLength | Gets the number of characters in a line containing the EditPoint object, excluding the new line character. |
![]() |
Parent | Gets the immediate parent object of the EditPoint object. |
Top
Methods
Name | Description | |
---|---|---|
![]() |
ChangeCase | Changes the case of the selected text. |
![]() |
CharLeft | Moves the edit point the specified number of characters to the left. |
![]() |
CharRight | Moves the edit point the specified number of characters to the right. |
![]() |
ClearBookmark | Clears all unnamed bookmarks in the current text buffer line. |
![]() |
Copy | Copies the specified range of text to the clipboard. |
![]() |
CreateEditPoint | Creates and returns an EditPoint object at the ___location of the calling object. |
![]() |
Cut | Copies the specified range of text to the clipboard and deletes it from the document. |
![]() |
Delete | Deletes the specified range of text. |
![]() |
DeleteWhitespace | Deletes the empty characters (white space) horizontally or vertically around the current ___location in the text buffer. |
![]() |
EndOfDocument | Moves the edit point to the end of the document. |
![]() |
EndOfLine | Moves the edit point to the end of the current line in the buffer. |
![]() |
EqualTo | Returns a value indicating whether the value of the given point object's AbsoluteCharOffset is equal to that of the calling EditPoint object. |
![]() |
FindPattern | Finds a given matching pattern in the selected text. |
![]() |
GetLines | Returns a string representing the text between two given lines. |
![]() |
GetText | Returns the text between the current ___location and the specified ___location in the buffer. |
![]() |
GreaterThan | Returns whether the value of the EditPoint object's AbsoluteCharOffset property is greater than that of the given TextPoint object. |
![]() |
Indent | Indents the selected lines by the given number of indentation levels. |
![]() |
Insert | Inserts the given string at the edit point's current position in the buffer. |
![]() |
InsertFromFile | Inserts the contents of the specified file at the current ___location in the buffer. |
![]() |
InsertNewLine | Detects the line break type used at the line where EditPoint2 is located (carriage return, line feed, and so on) and will insert Count new lines at the ___location of the EditPoint2. |
![]() |
LessThan | Returns whether the value of the called EditPoint object's AbsoluteCharOffset is less than that of the given TextPoint object. |
![]() |
LineDown | Moves the edit point down the specified number of lines. |
![]() |
LineUp | Moves the edit point up the specified number of lines. |
![]() |
MoveToAbsoluteOffset | Moves the active point to the given 1-based absolute character offset of the document. |
![]() |
MoveToLineAndOffset | Moves the document to the specified line and character offset position in that line. |
![]() |
MoveToPoint | Moves the active point to the given position. |
![]() |
NextBookmark | Moves to the ___location of the next bookmark in the document. |
![]() |
OutlineSection | Creates an outlining section based on an edit point and the given text point or value. |
![]() |
PadToColumn | Fills the current line in the buffer with empty characters (white space) to the given column. |
![]() |
Paste | Inserts the clipboard contents at the current ___location. |
![]() |
PreviousBookmark | Moves the edit point to the ___location of the previous bookmark in the document. |
![]() |
ReadOnly | Returns a value indicating whether any of the specified range contains read-only text. |
![]() |
ReplacePattern | Finds a pattern in the specified range of text and replaces it with the specified text. |
![]() |
ReplaceText | Replaces the selected text with the given text. |
![]() |
SetBookmark | Sets an unnamed bookmark on the current line in the buffer. |
![]() |
SmartFormat | Formats the specified range of text based on the current language. |
![]() |
StartOfDocument | Moves the object to the beginning of the document. |
![]() |
StartOfLine | Moves the edit point to the beginning of the current line in the buffer. |
![]() |
TryToShow | Attempts to display the text point's ___location. |
![]() |
Unindent | Removes the indent characters from the selected lines by the given number of indentation levels. |
![]() |
WordLeft | Moves the object the specified number of words to the left. |
![]() |
WordRight | Moves the object the specified number of words to the right. |
Top
Remarks
EditPoint2 objects are similar to TextSelection objects, except that they operate on data in the text buffer rather than on text displayed in a code editor. The difference is that text in the buffer is not affected by global editor states, such as word wrapping and virtual spaces.
Any operation that attempts to modify a text document fails if it affects any characters that are contained in a read-only block, or if the document itself is read-only.
Examples
Sub EditPointExample()
'Before running this example, open a text document.
Dim objTD As TextDocument
Dim objEP As EditPoint
objTD = DTE.ActiveDocument.Object("TextDocument")
objEP = objTD.StartPoint.CreateEditPoint
objEP.Insert "Hello"
End Sub