Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 19 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,11 @@
}
],
"commands": [
{
"command": "csharp.openUrlInBrowser",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly make the commandId here more specific? e.g. csharp.showNewCommandDocs (or similar), since it is opening a specific page and not any URL.

"title": "%command.openUrlInBrowser%",
"category": "CSharp"
},
{
"command": "o.restart",
"title": "%command.o.restart%",
Expand All @@ -1816,7 +1821,7 @@
{
"command": "dotnet.openSolution",
"title": "%command.dotnet.openSolution%",
"category": ".NET",
"category": "C#",
"enablement": "isWorkspaceTrusted && dotnet.server.activationContext == 'Roslyn'"
},
{
Expand Down Expand Up @@ -1852,43 +1857,43 @@
{
"command": "dotnet.generateAssets",
"title": "%command.dotnet.generateAssets.currentProject%",
"category": ".NET",
"category": "C#",
"enablement": "isWorkspaceTrusted && (dotnet.server.activationContext == 'RoslynDevKit' || dotnet.server.activationContext == 'Roslyn' || dotnet.server.activationContext == 'OmniSharp')"
},
{
"command": "dotnet.restore.project",
"title": "%command.dotnet.restore.project%",
"category": ".NET",
"category": "C#",
"enablement": "isWorkspaceTrusted && (dotnet.server.activationContext == 'Roslyn' || dotnet.server.activationContext == 'OmniSharp')"
},
{
"command": "dotnet.restore.all",
"title": "%command.dotnet.restore.all%",
"category": ".NET",
"category": "C#",
"enablement": "isWorkspaceTrusted && (dotnet.server.activationContext == 'Roslyn' || dotnet.server.activationContext == 'OmniSharp')"
},
{
"command": "csharp.changeProjectContext",
"title": "%command.csharp.changeProjectContext%",
"category": "CSharp",
"category": "C#",
"enablement": "dotnet.server.activationContext == 'Roslyn'"
},
{
"command": "csharp.listProcess",
"title": "%command.csharp.listProcess%",
"category": "CSharp",
"category": "C#",
"enablement": "isWorkspaceTrusted"
},
{
"command": "csharp.listRemoteProcess",
"title": "%command.csharp.listRemoteProcess%",
"category": "CSharp",
"category": "C#",
"enablement": "isWorkspaceTrusted"
},
{
"command": "csharp.listRemoteDockerProcess",
"title": "%command.csharp.listRemoteDockerProcess%",
"category": "CSharp",
"category": "C#",
"enablement": "isWorkspaceTrusted"
},
{
Expand All @@ -1900,19 +1905,19 @@
{
"command": "csharp.reportIssue",
"title": "%command.csharp.reportIssue%",
"category": "CSharp",
"category": "C#",
"enablement": "isWorkspaceTrusted"
},
{
"command": "csharp.showDecompilationTerms",
"title": "%command.csharp.showDecompilationTerms%",
"category": "CSharp",
"category": "C#",
"enablement": "isWorkspaceTrusted && dotnet.server.activationContext == 'OmniSharp'"
},
{
"command": "csharp.recordLanguageServerTrace",
"title": "%command.csharp.recordLanguageServerTrace%",
"category": "CSharp",
"category": "C#",
"enablement": "isWorkspaceTrusted && (dotnet.server.activationContext == 'Roslyn' || dotnet.server.activationContext == 'RoslynDevKit')"
},
{
Expand All @@ -1936,19 +1941,19 @@
{
"command": "dotnet.test.runTestsInContext",
"title": "%command.dotnet.test.runTestsInContext%",
"category": ".NET",
"category": "C#",
"enablement": "isWorkspaceTrusted && (dotnet.server.activationContext == 'Roslyn' || dotnet.server.activationContext == 'OmniSharp')"
},
{
"command": "dotnet.test.debugTestsInContext",
"title": "%command.dotnet.test.debugTestsInContext%",
"category": ".NET",
"category": "C#",
"enablement": "isWorkspaceTrusted && (dotnet.server.activationContext == 'Roslyn' || dotnet.server.activationContext == 'OmniSharp')"
},
{
"command": "dotnet.restartServer",
"title": "%command.dotnet.restartServer%",
"category": ".NET",
"category": "C#",
"enablement": "isWorkspaceTrusted && dotnet.server.activationContext == 'Roslyn'"
}
],
Expand Down
1 change: 1 addition & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"command.openUrlInBrowser": "Commands now start with C#",
"command.o.restart": "Restart OmniSharp",
"command.o.pickProjectAndStart": "Select Project",
"command.dotnet.openSolution": "Open Solution",
Expand Down
5 changes: 5 additions & 0 deletions src/lsptoolshost/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ function registerExtensionCommands(
context.subscriptions.push(
vscode.commands.registerCommand('csharp.showOutputWindow', async () => outputChannel.show())
);
context.subscriptions.push(
vscode.commands.registerCommand('csharp.openUrlInBrowser', async () => {
await vscode.env.openExternal(vscode.Uri.parse('https://aka.ms/new-csharp-commands'));
})
);
}
async function changeProjectContext(
languageServer: RoslynLanguageServer,
Expand Down