使您得以在文本缓冲区中将文本作为数据处理。
命名空间: EnvDTE80
程序集: EnvDTE80(在 EnvDTE80.dll 中)
语法
声明
<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
EditPoint2 类型公开以下成员。
属性
页首
方法
.gif) |
ChangeCase(Object, vsCaseOptions) |
(继承自 EditPoint。) |
.gif) |
ChangeCase(Object, vsCaseOptions) |
更改选定文本的大小写。 |
.gif) |
CharLeft(Int32) |
(继承自 EditPoint。) |
.gif) |
CharLeft(Int32) |
将编辑点左移指定的字符数。 |
.gif) |
CharRight(Int32) |
(继承自 EditPoint。) |
.gif) |
CharRight(Int32) |
将编辑点右移指定的字符数。 |
.gif) |
ClearBookmark() |
(继承自 EditPoint。) |
.gif) |
ClearBookmark() |
清除当前文本缓冲区行中所有未命名书签。 |
.gif) |
Copy(Object, Boolean) |
(继承自 EditPoint。) |
.gif) |
Copy(Object, Boolean) |
将指定范围内的文本复制到剪贴板。 |
.gif) |
CreateEditPoint() |
(继承自 EditPoint。) |
.gif) |
CreateEditPoint() |
在调用对象的位置创建并返回一个 EditPoint 对象。 |
.gif) |
Cut(Object, Boolean) |
(继承自 EditPoint。) |
.gif) |
Cut(Object, Boolean) |
将指定范围内的文本复制到剪贴板并将其从文档中删除。 |
.gif) |
Delete(Object) |
(继承自 EditPoint。) |
.gif) |
Delete(Object) |
删除指定范围内的文本。 |
.gif) |
DeleteWhitespace(vsWhitespaceOptions) |
(继承自 EditPoint。) |
.gif) |
DeleteWhitespace(vsWhitespaceOptions) |
删除文本缓冲区中当前位置周围的水平方向或垂直方向的空字符串(空白)。 |
.gif) |
EndOfDocument() |
(继承自 EditPoint。) |
.gif) |
EndOfDocument() |
将编辑点移到文档结尾。 |
.gif) |
EndOfLine() |
(继承自 EditPoint。) |
.gif) |
EndOfLine() |
将编辑点移动到缓冲区中当前行的行尾。 |
.gif) |
EqualTo(TextPoint) |
(继承自 EditPoint。) |
.gif) |
EqualTo(TextPoint) |
返回一个值,该值指示给定点对象的 AbsoluteCharOffset 值是否等于调用 EditPoint 对象的值。 |
.gif) |
FindPattern(String, Int32, EditPoint%, TextRanges%) |
(继承自 EditPoint。) |
.gif) |
FindPattern(String, Int32, EditPoint%, TextRanges%) |
在选定文本中查找给定的匹配模式。 |
.gif) |
GetLines(Int32, Int32) |
(继承自 EditPoint。) |
.gif) |
GetLines(Int32, Int32) |
返回表示两给定行之间的文本的字符串。 |
.gif) |
GetText(Object) |
(继承自 EditPoint。) |
.gif) |
GetText(Object) |
返回缓冲区中当前位置和指定位置之间的文本。 |
.gif) |
GreaterThan(TextPoint) |
(继承自 EditPoint。) |
.gif) |
GreaterThan(TextPoint) |
返回 EditPoint 对象的 AbsoluteCharOffset 属性值是否大于给定 TextPoint 对象的属性值。 |
.gif) |
Indent(TextPoint, Int32) |
(继承自 EditPoint。) |
.gif) |
Indent(TextPoint, Int32) |
按给定的缩进级别数缩进选定的行。 |
.gif) |
Insert(String) |
(继承自 EditPoint。) |
.gif) |
Insert(String) |
在缓冲区中编辑点的当前位置插入给定字符串。 |
.gif) |
InsertFromFile(String) |
(继承自 EditPoint。) |
.gif) |
InsertFromFile(String) |
在缓冲区中的当前位置插入指定文件的内容。 |
.gif) |
InsertNewLine |
检测在 EditPoint2 所在的行上使用的换行类型(回车符、换行符等),并将在 EditPoint2 所处的位置插入 Count 个新行。 |
.gif) |
LessThan(TextPoint) |
(继承自 EditPoint。) |
.gif) |
LessThan(TextPoint) |
返回被调用 EditPoint 对象的 AbsoluteCharOffset 的值是否小于给定 TextPoint 对象的值。 |
.gif) |
LineDown(Int32) |
(继承自 EditPoint。) |
.gif) |
LineDown(Int32) |
将编辑点下移指定的行数。 |
.gif) |
LineUp(Int32) |
(继承自 EditPoint。) |
.gif) |
LineUp(Int32) |
将编辑点上移指定的行数。 |
.gif) |
MoveToAbsoluteOffset(Int32) |
(继承自 EditPoint。) |
.gif) |
MoveToAbsoluteOffset(Int32) |
将活动点移动到文档的给定的基于 1 的绝对字符偏移位置。 |
.gif) |
MoveToLineAndOffset(Int32, Int32) |
(继承自 EditPoint。) |
.gif) |
MoveToLineAndOffset(Int32, Int32) |
将文档移动到指定的行和该行的字符偏移位置。 |
.gif) |
MoveToPoint(TextPoint) |
(继承自 EditPoint。) |
.gif) |
MoveToPoint(TextPoint) |
将活动点移到给定位置。 |
.gif) |
NextBookmark() |
(继承自 EditPoint。) |
.gif) |
NextBookmark() |
移动到文档中的下一个书签位置。 |
.gif) |
OutlineSection(Object) |
(继承自 EditPoint。) |
.gif) |
OutlineSection(Object) |
根据编辑点和给定的文本点或值创建大纲部分。 |
.gif) |
PadToColumn(Int32) |
(继承自 EditPoint。) |
.gif) |
PadToColumn(Int32) |
将缓冲区中的当前行到给定列用空字符(空白)填充。 |
.gif) |
Paste() |
(继承自 EditPoint。) |
.gif) |
Paste() |
在当前位置插入剪贴板内容。 |
.gif) |
PreviousBookmark() |
(继承自 EditPoint。) |
.gif) |
PreviousBookmark() |
将编辑点移动到文档中的上一个书签位置。 |
.gif) |
ReadOnly(Object) |
(继承自 EditPoint。) |
.gif) |
ReadOnly(Object) |
返回一个值,该值指示任何指定范围内是否包含只读文本。 |
.gif) |
ReplacePattern(TextPoint, String, String, Int32, TextRanges%) |
(继承自 EditPoint。) |
.gif) |
ReplacePattern(TextPoint, String, String, Int32, TextRanges%) |
在指定范围内的文本中查找模式并用指定文本替换它。 |
.gif) |
ReplaceText(Object, String, Int32) |
(继承自 EditPoint。) |
.gif) |
ReplaceText(Object, String, Int32) |
用给定文本替换选定文本。 |
.gif) |
SetBookmark() |
(继承自 EditPoint。) |
.gif) |
SetBookmark() |
在缓冲区中的当前行上设置未命名的书签。 |
.gif) |
SmartFormat(TextPoint) |
(继承自 EditPoint。) |
.gif) |
SmartFormat(TextPoint) |
根据当前语言格式化指定范围内的文本。 |
.gif) |
StartOfDocument() |
(继承自 EditPoint。) |
.gif) |
StartOfDocument() |
将对象移动到文档开头。 |
.gif) |
StartOfLine() |
(继承自 EditPoint。) |
.gif) |
StartOfLine() |
将编辑点移到缓冲区中当前行的行首。 |
.gif) |
TryToShow(vsPaneShowHow, Object) |
(继承自 EditPoint。) |
.gif) |
TryToShow(vsPaneShowHow, Object) |
尝试显示文本点的位置。 |
.gif) |
Unindent(TextPoint, Int32) |
(继承自 EditPoint。) |
.gif) |
Unindent(TextPoint, Int32) |
按给定的缩进级别数从选定行移除缩进字符。 |
.gif) |
WordLeft(Int32) |
(继承自 EditPoint。) |
.gif) |
WordLeft(Int32) |
将对象左移指定的字数。 |
.gif) |
WordRight(Int32) |
(继承自 EditPoint。) |
.gif) |
WordRight(Int32) |
将对象右移指定的字数。 |
页首
备注
EditPoint2 对象类似于 TextSelection 对象,但它操作的是文本缓冲区中的数据,而不是代码编辑器中显示的文本。 区别在于缓冲区中的文本不受全局编辑器状态(如自动换行和虚空格)的影响。
如果操作影响只读块中包含的任何字符或者文档本身是只读的,则任何尝试修改文本文档的操作都将失败。
示例
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
请参见
参考
EnvDTE80 命名空间