33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 *--------------------------------------------------------------------------------------------*/
55
6- export const OmniSharpCommands = [
6+ // Commands used by all activation contexts of the extension.
7+ const CommonCommands = [
8+ 'dotnet.generateAssets' ,
9+ 'csharp.listProcess' ,
10+ 'csharp.listRemoteProcess' ,
11+ 'csharp.listRemoteDockerProcess' ,
12+ 'csharp.attachToProcess' ,
13+ 'csharp.reportIssue' ,
14+ ] ;
15+
16+ // Commands used by both O# and Roslyn standalone activation contexts.
17+ const CommonStandaloneCommands = [
18+ 'dotnet.restore.project' ,
19+ 'dotnet.restore.all' ,
20+ 'dotnet.test.runTestsInContext' ,
21+ 'dotnet.test.debugTestsInContext' ,
22+ ] ;
23+
24+ // Commands used only in an O# activation context.
25+ const OmniSharpOnlyCommands = [
726 'o.restart' ,
827 'o.pickProjectAndStart' ,
928 'o.fixAll.solution' ,
@@ -13,17 +32,35 @@ export const OmniSharpCommands = [
1332 'o.reanalyze.currentProject' ,
1433] ;
1534
16- export const RoslynCommands = [ 'dotnet.openSolution' , 'dotnet.restartServer' ] ;
35+ // All commands used in the O# activation context.
36+ export const OmniSharpCommands = [ ...OmniSharpOnlyCommands , ...CommonCommands , ...CommonStandaloneCommands ] ;
1737
18- export const CommonCommands = [
19- 'dotnet.generateAssets' ,
20- 'dotnet.restore.project' ,
21- 'dotnet.restore.all' ,
22- 'dotnet.test.runTestsInContext' ,
23- 'dotnet.test.debugTestsInContext' ,
24- 'csharp.listProcess' ,
25- 'csharp.listRemoteProcess' ,
26- 'csharp.listRemoteDockerProcess' ,
27- 'csharp.attachToProcess' ,
28- 'csharp.reportIssue' ,
38+ // Commands used only in a Roslyn activation context.
39+ const RoslynCommonCommands = [ 'dotnet.restartServer' ] ;
40+
41+ // Commands used only in a Roslyn standalone activation context.
42+ const RoslynStandaloneOnlyCommands = [ 'dotnet.openSolution' ] ;
43+
44+ // All commands used in a Roslyn standalone activation context.
45+ export const RoslynStandaloneCommands = [
46+ ...CommonCommands ,
47+ ...CommonStandaloneCommands ,
48+ ...RoslynCommonCommands ,
49+ ...RoslynStandaloneOnlyCommands ,
50+ ] ;
51+
52+ // All commands used in a Roslyn + C# Dev Kit activation context.
53+ export const RoslynDevKitCommands = [ ...CommonCommands , ...RoslynCommonCommands ] ;
54+
55+ // All commands that should not be available in an O# activation context.
56+ export const UnexpectedOmniSharpCommands = [ ...RoslynStandaloneOnlyCommands , ...RoslynCommonCommands ] ;
57+
58+ // All commands that should not be available in a Roslyn standalone activation context.
59+ export const UnexpectedRoslynStandaloneCommands = [ ...OmniSharpOnlyCommands ] ;
60+
61+ // All commands that should not be available in a Roslyn + C# Dev Kit activation context.
62+ export const UnexpectedRoslynDevKitCommands = [
63+ ...CommonStandaloneCommands ,
64+ ...OmniSharpOnlyCommands ,
65+ ...RoslynStandaloneOnlyCommands ,
2966] ;
0 commit comments