Share via


Completor.Apply Method

Applies all changes made through the Completor object.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

'Declaration
Public Sub Apply
'Usage
Dim instance As Completor

instance.Apply()
public void Apply()
public:
void Apply()
public function Apply()

Remarks

This method calls the ReplaceTextOnLine method on the IVsTextView object that was passed to the Completor class constructor. This method then disposes off the CompoundAction object created in the constructor. Finally, the text view's caret position is updated (with a call to the SetCaretPos method on the IVsTextView object) based on the internal caret position stored in the Completor object.

Note

If a newline character was added to the line, the resulting text appears in the text view as multiple lines. However, the internal caret position does not take into account multiple lines so the text view's final caret position may not be where you expect.

.NET Framework Security

See Also

Reference

Completor Class

Completor Members

Microsoft.VisualStudio.Package Namespace