EditPoint.SmartFormat 메서드

지정한 텍스트 범위의 서식을 현재 언어에 따라 지정합니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

‘선언
Sub SmartFormat ( _
    Point As TextPoint _
)
void SmartFormat(
    TextPoint Point
)
void SmartFormat(
    [InAttribute] TextPoint^ Point
)
abstract SmartFormat : 
        Point:TextPoint -> unit 
function SmartFormat(
    Point : TextPoint
)

매개 변수

설명

자동 서식 지정은 특정 언어가 코드 서식을 자동으로 지정하는 것입니다.편집 지점에서 Point 범위까지 자동 서식이 설정됩니다.도구 메뉴의 옵션 대화 상자에 있는 텍스트 편집기 노드에서 각 언어에 대해 별도로 자동 서식 옵션을 선택할 수 있습니다.

서식을 다시 적용할 때에는 끝 지점이 있는 줄이 포함되고 자동 서식 지정 스타일(vsSmartFormatOptions)에 대한 전역 설정을 따릅니다.

예제

Sub SmartFormatExample()
   Dim objTextDoc As TextDocument
   Dim objMovePt As EditPoint
   Dim objEditPt As EditPoint, iCtr As Integer

   ' Create a new text file.
   DTE.ItemOperations.NewFile("General\Text File")

   ' Get a handle to the new document and create an EditPoint.
   objTextDoc = DTE.ActiveDocument.Object("TextDocument")
   objMovePt = objTextDoc.EndPoint.CreateEditPoint
   objEditPt = objTextDoc.StartPoint.CreateEditPoint

   ' Insert ten lines of text.
   For iCtr = 1 To 10
      objEditPt.Insert("This is a test." & Chr(13))
   Next iCtr
   objEditPt.StartOfDocument()
   objMovePt.EndOfDocument()
   objEditPt.SmartFormat(objMovePt)
End Sub

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

EditPoint 인터페이스

EnvDTE 네임스페이스