EditPoint Interface

 

Allows you to manipulate text as data in text buffers.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

[GuidAttribute("C1FFE800-028B-4475-A907-14F51F19BB7D")]
public interface EditPoint : TextPoint

NameDescription
System_CAPS_pubpropertyAbsoluteCharOffset

Gets the one-based character offset of the EditPoint object.

System_CAPS_pubpropertyAtEndOfDocument

Gets a value indicating whether or not the object is at the end of the document.

System_CAPS_pubpropertyAtEndOfLine

Gets a value indicating whether or not the object is at the end of a line.

System_CAPS_pubpropertyAtStartOfDocument

Gets a value indicating whether or not the object is at the beginning of the document.

System_CAPS_pubpropertyAtStartOfLine

Gets a value indicating whether or not the EditPoint object is at the beginning of a line.

System_CAPS_pubpropertyCodeElement[vsCMElement]

Gets the code element at the EditPoint location.

System_CAPS_pubpropertyDisplayColumn

Gets the number of the column number of the EditPoint object.

System_CAPS_pubpropertyDTE

Gets the top-level extensibility object.

System_CAPS_pubpropertyLine

Gets the EditPoint object's line number.

System_CAPS_pubpropertyLineCharOffset

Gets the character offset of the EditPoint object.

System_CAPS_pubpropertyLineLength

Gets the number of characters in a line.

System_CAPS_pubpropertyParent

Gets the immediate parent object of the EditPoint object.

NameDescription
System_CAPS_pubmethodChangeCase(Object, vsCaseOptions)

Changes the case of the selected text.

System_CAPS_pubmethodCharLeft(Int32)

Moves the edit point the specified number of characters to the left.

System_CAPS_pubmethodCharRight(Int32)

Moves the edit point the specified number of characters to the right.

System_CAPS_pubmethodClearBookmark()

Clears any unnamed bookmarks in the current text buffer line.

System_CAPS_pubmethodCopy(Object, Boolean)

Copies the specified range of text to the clipboard.

System_CAPS_pubmethodCreateEditPoint()

Creates and returns an EditPoint object at the location of the calling object.

System_CAPS_pubmethodCut(Object, Boolean)

Copies the specified range of text to the clipboard and deletes it from the document.

System_CAPS_pubmethodDelete(Object)

Deletes the specified range of text.

System_CAPS_pubmethodDeleteWhitespace(vsWhitespaceOptions)

Deletes the empty characters (white space) horizontally or vertically around the current location in the text buffer.

System_CAPS_pubmethodEndOfDocument()

Moves the edit point to the end of the document.

System_CAPS_pubmethodEndOfLine()

Moves the edit point to the end of the current line in the buffer.

System_CAPS_pubmethodEqualTo(TextPoint)

Returns a value indicating whether the value of the given point object's AbsoluteCharOffset is equal to that of the calling EditPoint object.

System_CAPS_pubmethodFindPattern(String, Int32, EditPoint, TextRanges)

Finds a given matching pattern in the selected text.

System_CAPS_pubmethodGetLines(Int32, Int32)

Gets a string representing the text between two given lines.

System_CAPS_pubmethodGetText(Object)

Gets the text between the current location and the specified location in the buffer.

System_CAPS_pubmethodGreaterThan(TextPoint)

Returns whether the value of the EditPoint object's AbsoluteCharOffset property is greater than that of the given TextPoint object.

System_CAPS_pubmethodIndent(TextPoint, Int32)

Indents the selected lines by the given number of indentation levels.

System_CAPS_pubmethodInsert(String)

Inserts the given string at the edit point's current position in the buffer.

System_CAPS_pubmethodInsertFromFile(String)

Inserts the contents of the specified file at the current location in the buffer.

System_CAPS_pubmethodLessThan(TextPoint)

Returns whether the value of the called EditPoint object's AbsoluteCharOffset is less than that of the given TextPoint object.

System_CAPS_pubmethodLineDown(Int32)

Moves the edit point down the specified number of lines.

System_CAPS_pubmethodLineUp(Int32)

Moves the edit point up the specified number of lines.

System_CAPS_pubmethodMoveToAbsoluteOffset(Int32)

Moves the active point to the given 1-based absolute character offset.

System_CAPS_pubmethodMoveToLineAndOffset(Int32, Int32)

Moves the document to the specified line and character offset position in that line.

System_CAPS_pubmethodMoveToPoint(TextPoint)

Moves the active point to the given position.

System_CAPS_pubmethodNextBookmark()

Moves to the location of the next bookmark in the document.

System_CAPS_pubmethodOutlineSection(Object)

Creates an outlining section based on an edit point and the given text point or value.

System_CAPS_pubmethodPadToColumn(Int32)

Fills the current line in the buffer with empty characters (white space) to the given column.

System_CAPS_pubmethodPaste()

Inserts the clipboard contents at the current location.

System_CAPS_pubmethodPreviousBookmark()

Moves the edit point to the location of the previous bookmark in the document.

System_CAPS_pubmethodReadOnly(Object)

Returns a value indicating whether any of the specified range contains read-only text.

System_CAPS_pubmethodReplacePattern(TextPoint, String, String, Int32, TextRanges)

Finds a pattern in the specified range of text and replaces it with the specified text.

System_CAPS_pubmethodReplaceText(Object, String, Int32)

Replaces the selected text with the given text.

System_CAPS_pubmethodSetBookmark()

Sets an unnamed bookmark on the current line in the buffer.

System_CAPS_pubmethodSmartFormat(TextPoint)

Formats the specified range of text based on the current language.

System_CAPS_pubmethodStartOfDocument()

Moves the object to the beginning of the document.

System_CAPS_pubmethodStartOfLine()

Moves the edit point to the beginning of the current line in the buffer.

System_CAPS_pubmethodTryToShow(vsPaneShowHow, Object)

Attempts to display the text point's location.

System_CAPS_pubmethodUnindent(TextPoint, Int32)

Removes the indent characters from the selected lines by the given number of indentation levels.

System_CAPS_pubmethodWordLeft(Int32)

Moves the object the specified number of words to the left.

System_CAPS_pubmethodWordRight(Int32)

Moves the object the specified number of words to the right.

EditPoint 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.

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
Return to top
Show: