You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -107,8 +106,6 @@ The first line validates the arguments, then we create a new `Guid` to use later
107
106
108
107
Then, we create an `ITextViewSnapshot` (the `textView` object here) by calling the asynchronous method `GetActiveTextViewAsync`. A cancellation token is passed in to preserve the ability to cancel the asynchronous request, but this isn't demonstrated in this sample. If we don't get a text view successfully, we'll write to the log and terminate without doing anything else.
109
108
110
-
Next, we request the document, an instance of `ITextDocumentSnapshot` (here `document`).
111
-
112
109
Now we're ready to call the asynchronous method that submits an edit request to Visual Studio's editor. The method we want is `EditAsync`. That's a member of the `EditorExtensibility` class, which allows interaction with the running Visual Studio Editor in the IDE. The `Command` type, which your own `InsertGuidCommand` class inherits from, has a member `Extensibility` that provides access to the `EditorExtensibility` object, so we can get to the `EditorExtensibility` class with a call to `this.Extensibility.Editor()`.
113
110
114
111
The `EditAsync` method takes an `Action<IEditBatch>` as a parameter. This is called `editorSource`,
@@ -119,7 +116,7 @@ The call to `EditAsync` uses a lambda expression. To break this down a little, y
0 commit comments