@@ -65,13 +65,12 @@ export function registerToolchainCommands(
6565}
6666
6767export enum Commands {
68- ResolveDependencies = "swift.resolveDependencies" ,
69- UpdateDependencies = "swift.updateDependencies" ,
70- RunTestsMultipleTimes = "swift.runTestsMultipleTimes" ,
71- ResetPackage = "swift.resetPackage" ,
72- UseLocalDependency = "swift.useLocalDependency" ,
73- UneditDependency = "swift.uneditDependency" ,
74- runTestsMultipleTimes = "runTestsMultipleTimes" ,
68+ RESOLVE_DEPENDENCIES = "swift.resolveDependencies" ,
69+ UPDATE_DEPENDENCIES = "swift.updateDependencies" ,
70+ RUN_TESTS_MULTIPLE_TIMES = "swift.runTestsMultipleTimes" ,
71+ RESET_PACKAGE = "swift.resetPackage" ,
72+ USE_LOCAL_DEPENDENCY = "swift.useLocalDependency" ,
73+ UNEDIT_DEPENDENCY = "swift.uneditDependency" ,
7574}
7675
7776/**
@@ -80,14 +79,16 @@ export enum Commands {
8079export function register ( ctx : WorkspaceContext ) : vscode . Disposable [ ] {
8180 return [
8281 vscode . commands . registerCommand ( "swift.newFile" , uri => newSwiftFile ( uri ) ) ,
83- vscode . commands . registerCommand ( Commands . ResolveDependencies , ( ) =>
82+ vscode . commands . registerCommand ( Commands . RESOLVE_DEPENDENCIES , ( ) =>
8483 resolveDependencies ( ctx )
8584 ) ,
86- vscode . commands . registerCommand ( Commands . UpdateDependencies , ( ) => updateDependencies ( ctx ) ) ,
85+ vscode . commands . registerCommand ( Commands . UPDATE_DEPENDENCIES , ( ) =>
86+ updateDependencies ( ctx )
87+ ) ,
8788 vscode . commands . registerCommand ( "swift.run" , ( ) => runBuild ( ctx ) ) ,
8889 vscode . commands . registerCommand ( "swift.debug" , ( ) => debugBuild ( ctx ) ) ,
8990 vscode . commands . registerCommand ( "swift.cleanBuild" , ( ) => cleanBuild ( ctx ) ) ,
90- vscode . commands . registerCommand ( Commands . RunTestsMultipleTimes , item => {
91+ vscode . commands . registerCommand ( Commands . RUN_TESTS_MULTIPLE_TIMES , item => {
9192 if ( ctx . currentFolder ) {
9293 return runTestMultipleTimes ( ctx . currentFolder , item , false ) ;
9394 }
@@ -99,7 +100,7 @@ export function register(ctx: WorkspaceContext): vscode.Disposable[] {
99100 } ) ,
100101 // Note: This is only available on macOS (gated in `package.json`) because its the only OS that has the iOS SDK available.
101102 vscode . commands . registerCommand ( "swift.switchPlatform" , ( ) => switchPlatform ( ) ) ,
102- vscode . commands . registerCommand ( Commands . ResetPackage , ( ) => resetPackage ( ctx ) ) ,
103+ vscode . commands . registerCommand ( Commands . RESET_PACKAGE , ( ) => resetPackage ( ctx ) ) ,
103104 vscode . commands . registerCommand ( "swift.runScript" , ( ) => runSwiftScript ( ctx ) ) ,
104105 vscode . commands . registerCommand ( "swift.openPackage" , ( ) => {
105106 if ( ctx . currentFolder ) {
@@ -116,7 +117,7 @@ export function register(ctx: WorkspaceContext): vscode.Disposable[] {
116117 vscode . commands . registerCommand ( "swift.insertFunctionComment" , ( ) =>
117118 insertFunctionComment ( ctx )
118119 ) ,
119- vscode . commands . registerCommand ( Commands . UseLocalDependency , item => {
120+ vscode . commands . registerCommand ( Commands . USE_LOCAL_DEPENDENCY , item => {
120121 if ( item instanceof PackageNode ) {
121122 return useLocalDependency ( item . name , ctx ) ;
122123 }
@@ -126,7 +127,7 @@ export function register(ctx: WorkspaceContext): vscode.Disposable[] {
126127 return editDependency ( item . name , ctx ) ;
127128 }
128129 } ) ,
129- vscode . commands . registerCommand ( Commands . UneditDependency , item => {
130+ vscode . commands . registerCommand ( Commands . UNEDIT_DEPENDENCY , item => {
130131 if ( item instanceof PackageNode ) {
131132 return uneditDependency ( item . name , ctx ) ;
132133 }
0 commit comments