ViewFilter.ReformatDocument Method
Handles the FORMATDOCUMENT command to reformat the entire document.
Namespace: Microsoft.VisualStudio.Package
Assemblies: Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
Syntax
‘선언
Public Overridable Sub ReformatDocument
‘사용 방법
Dim instance As ViewFilter
instance.ReformatDocument()
public virtual void ReformatDocument()
public:
virtual void ReformatDocument()
abstract ReformatDocument : unit -> unit
override ReformatDocument : unit -> unit
public function ReformatDocument()
Remarks
The base method determines if reformatting is supported, gets the TextSpan for the entire document, creates a new EditArray object to wrap all changes made in a single undo event, then calls the ReformatSpan method on the Source object that was obtained from the CodeWindowManager object in the ViewFilter class constructor. Finally, the base method calls the ApplyEdits method on the EditArray object to commit all the changes.
Typically, you override the ReformatSpan method on the Source class to support reformatting a document. Since the base method sets up everything for a call to the ReformatSpan method, you do not typically need to override this method unless your version of ReformatSpan has special requirements.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.