本文整理汇总了C#中EnvDTE.CharRight方法的典型用法代码示例。如果您正苦于以下问题:C# EnvDTE.CharRight方法的具体用法?C# EnvDTE.CharRight怎么用?C# EnvDTE.CharRight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EnvDTE
的用法示例。
在下文中一共展示了EnvDTE.CharRight方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SkipWhitespace
/**
* Helper function returns -1 if the line is empty else returns the
* amount of whitespace pt is indented by
*/
private static int SkipWhitespace(
EnvDTE.EditPoint pt)
{
int start = pt.DisplayColumn;
while (!pt.AtEndOfLine &&
((pt.GetText(1) == " ") ||
(pt.GetText(1) == "\t")))
{
pt.CharRight(1);
}
if (pt.AtEndOfLine)
{
return -1;
}
else
{
return pt.DisplayColumn-start;
}
}
示例2: SkipString
private static void SkipString(EnvDTE.EditPoint pt, string wanted)
{
string actual = GetTextOnLine(pt, wanted.Length);
if (actual != wanted)
{
throw new System.ArgumentException("Error parsing expected string", wanted);
}
pt.CharRight(wanted.Length);
}
示例3: GoToEndOfPreviousWord
private static void GoToEndOfPreviousWord(
EnvDTE.EditPoint pt)
{
pt.CharLeft(1);
while ((pt.GetText(1) != " ") &&
(pt.GetText(1) != "\t"))
{
pt.CharLeft(1);
}
while ((pt.GetText(1) == " ") ||
(pt.GetText(1) == "\t"))
{
pt.CharLeft(1);
}
pt.CharRight(1);
}
示例4: SkipColumns
private static void SkipColumns(
EnvDTE.EditPoint pt,
int blockIndentation)
{
int start = pt.DisplayColumn;
int startLine = pt.Line;
while ((pt.DisplayColumn-start) < blockIndentation)
{
pt.CharRight(1);
if (pt.Line != startLine)
{
throw new System.ArgumentException("Error parsing columns");
}
}
if ((pt.DisplayColumn-start) != blockIndentation)
{
throw new System.ArgumentException("Error parsing columns");
}
}
示例5: GoToEndOfNextWord
// pre: must be a word before the end of the line moves to the end of
// the word
private static void GoToEndOfNextWord(
EnvDTE.EditPoint pt)
{
while ((pt.GetText(1) == " ") ||
(pt.GetText(1) == "\t"))
{
pt.CharRight(1);
}
while ((!pt.AtEndOfLine) &&
(pt.GetText(1) != " ") &&
(pt.GetText(1) != "\t"))
{
pt.CharRight(1);
}
}