Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWIP: Add new 'powerShell/getCommandInformation' message #1185
Conversation
|
I think I'd want them in the same handler. Since they both return the same data. It'd be a smaller change too :) |
|
Complexity increasing per file
==============================
- src/PowerShellEditorServices/Services/PowerShellContext/Handlers/GetCommandHandler.cs 1
See the complete overview on Codacy |
|
Duplicate of # |
| @@ -17,7 +17,10 @@ namespace Microsoft.PowerShell.EditorServices.Handlers | |||
| [Serial, Method("powerShell/getCommand")] | |||
BoryaBorya
Jun 23, 2020
Suggested change
[Serial, Method("powerShell/getCommand")]
[Serial, Method("powerShell/getCommand")]
| [Serial, Method("powerShell/getCommand")] | |
| [Serial, Method("powerShell/getCommand")] |
This adds a new getCommandInformation message used by the Command Explorer to get the details of a given command.
Pre-omnisharp we were optionally sending the name of a command in the
powerShell/getCommandmessage, and had code to get information for a single command in that instance. It appears this was removed.I am split on if it's better being separate handlers. On the one hand, it seems it might be easier to understand being separate handlers, but it adds code duplication that might not be needed.If kept as separate messages as shown here, there is some code cleanup we can do in the getCommand message handler as it's currently sending back values that are guaranteed to be empty and can be removed.