|
1 | | -import { commands, ExtensionContext, LogOutputChannel, Terminal, Uri, workspace, window } from 'vscode'; |
| 1 | +import { commands, ExtensionContext, LogOutputChannel, Terminal, Uri, window } from 'vscode'; |
2 | 2 | import { PythonEnvironment, PythonEnvironmentApi } from './api'; |
3 | 3 | import { ensureCorrectVersion } from './common/extVersion'; |
4 | 4 | import { registerTools } from './common/lm.apis'; |
@@ -95,26 +95,6 @@ export async function activate(context: ExtensionContext): Promise<PythonEnviron |
95 | 95 | return projectManager.get(uri) !== undefined; |
96 | 96 | }; |
97 | 97 |
|
98 | | - // Update the context key when explorer selection changes |
99 | | - context.subscriptions.push( |
100 | | - window.onDidChangeActiveTextEditor((editor) => { |
101 | | - if (editor) { |
102 | | - commands.executeCommand('setContext', 'python-envs:isExistingProject', isExistingProject(editor.document.uri)); |
103 | | - } |
104 | | - }), |
105 | | - window.onDidChangeWindowState(() => { |
106 | | - const activeEditor = window.activeTextEditor; |
107 | | - if (activeEditor) { |
108 | | - commands.executeCommand('setContext', 'python-envs:isExistingProject', isExistingProject(activeEditor.document.uri)); |
109 | | - } |
110 | | - }), |
111 | | - workspace.onDidOpenTextDocument((document) => { |
112 | | - if (window.activeTextEditor && window.activeTextEditor.document === document) { |
113 | | - commands.executeCommand('setContext', 'python-envs:isExistingProject', isExistingProject(document.uri)); |
114 | | - } |
115 | | - }) |
116 | | - ); |
117 | | - |
118 | 98 | const envVarManager: EnvVarManager = new PythonEnvVariableManager(projectManager); |
119 | 99 | context.subscriptions.push(envVarManager); |
120 | 100 |
|
|
0 commit comments