1
1
/* eslint-disable max-classes-per-file */
2
2
3
3
import { inject , injectable , named } from 'inversify' ;
4
- import * as os from 'os' ;
5
4
import * as semver from 'semver' ;
6
5
import { CancellationToken , OutputChannel , Uri } from 'vscode' ;
7
6
import '../extensions' ;
@@ -14,9 +13,7 @@ import { EventName } from '../../telemetry/constants';
14
13
import { IApplicationShell , ICommandManager , IWorkspaceService } from '../application/types' ;
15
14
import { Commands , STANDARD_OUTPUT_CHANNEL } from '../constants' ;
16
15
import { traceError , traceInfo } from '../logger' ;
17
- import { IPlatformService } from '../platform/types' ;
18
16
import { IProcessServiceFactory , IPythonExecutionFactory } from '../process/types' ;
19
- import { ITerminalServiceFactory } from '../terminal/types' ;
20
17
import {
21
18
IConfigurationService ,
22
19
IInstaller ,
@@ -43,9 +40,6 @@ import {
43
40
44
41
export { Product } from '../types' ;
45
42
46
- export const CTagsInstallationScript =
47
- os . platform ( ) === 'darwin' ? 'brew install ctags' : 'sudo apt-get install exuberant-ctags' ;
48
-
49
43
// Products which may not be available to install from certain package registries, keyed by product name
50
44
// Installer implementations can check this to determine a suitable installation channel for a product
51
45
// This is temporary and can be removed when https://github.com/microsoft/vscode-jupyter/issues/5034 is unblocked
@@ -226,46 +220,6 @@ abstract class BaseInstaller {
226
220
}
227
221
}
228
222
229
- export class CTagsInstaller extends BaseInstaller {
230
- public async install ( _product : Product , resource ?: Uri ) : Promise < InstallerResponse > {
231
- if ( this . serviceContainer . get < IPlatformService > ( IPlatformService ) . isWindows ) {
232
- this . outputChannel . appendLine ( 'Install Universal Ctags Win32 to enable support for Workspace Symbols' ) ;
233
- this . outputChannel . appendLine ( 'Download the CTags binary from the Universal CTags site.' ) ;
234
- this . outputChannel . appendLine (
235
- 'Option 1: Extract ctags.exe from the downloaded zip to any folder within your PATH so that Visual Studio Code can run it.' ,
236
- ) ;
237
- this . outputChannel . appendLine (
238
- 'Option 2: Extract to any folder and add the path to this folder to the command setting.' ,
239
- ) ;
240
- this . outputChannel . appendLine (
241
- 'Option 3: Extract to any folder and define that path in the python.workspaceSymbols.ctagsPath setting of your user settings file (settings.json).' ,
242
- ) ;
243
- this . outputChannel . show ( ) ;
244
- } else {
245
- const terminalService = this . serviceContainer
246
- . get < ITerminalServiceFactory > ( ITerminalServiceFactory )
247
- . getTerminalService ( { resource } ) ;
248
- terminalService
249
- . sendCommand ( CTagsInstallationScript , [ ] )
250
- . catch ( ( ex ) => traceError ( `Failed to install ctags. Script sent '${ CTagsInstallationScript } ', ${ ex } ` ) ) ;
251
- }
252
- return InstallerResponse . Ignore ;
253
- }
254
-
255
- protected async promptToInstallImplementation (
256
- product : Product ,
257
- resource ?: Uri ,
258
- _cancel ?: CancellationToken ,
259
- ) : Promise < InstallerResponse > {
260
- const item = await this . appShell . showErrorMessage (
261
- 'Install CTags to enable Python workspace symbols?' ,
262
- 'Yes' ,
263
- 'No' ,
264
- ) ;
265
- return item === 'Yes' ? this . install ( product , resource ) : InstallerResponse . Ignore ;
266
- }
267
- }
268
-
269
223
export class FormatterInstaller extends BaseInstaller {
270
224
protected async promptToInstallImplementation (
271
225
product : Product ,
@@ -589,8 +543,6 @@ export class ProductInstaller implements IInstaller {
589
543
return new FormatterInstaller ( this . serviceContainer , this . outputChannel ) ;
590
544
case ProductType . Linter :
591
545
return new LinterInstaller ( this . serviceContainer , this . outputChannel ) ;
592
- case ProductType . WorkspaceSymbols :
593
- return new CTagsInstaller ( this . serviceContainer , this . outputChannel ) ;
594
546
case ProductType . TestFramework :
595
547
return new TestFrameworkInstaller ( this . serviceContainer , this . outputChannel ) ;
596
548
case ProductType . RefactoringLibrary :
0 commit comments