Skip to content

Commit

Permalink
reverting few changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Feb 8, 2019
1 parent 1a4ef1b commit 0f103a9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
1 change: 0 additions & 1 deletion news/1 Enhancements/4317.md

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1906,8 +1906,7 @@
"test": [
{
"id": "python_tests",
"name": "PYTHON",
"when": "extensionActivated"
"name": "PYTHON"
}
]
}
Expand Down
6 changes: 2 additions & 4 deletions src/client/activation/activationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { inject, injectable, multiInject } from 'inversify';
import { TextDocument, workspace } from 'vscode';
import { IApplicationDiagnostics } from '../application/types';
import { ICommandManager, IDocumentManager, IWorkspaceService } from '../common/application/types';
import { IDocumentManager, IWorkspaceService } from '../common/application/types';
import { PYTHON_LANGUAGE } from '../common/constants';
import { traceDecorators } from '../common/logger';
import { IDisposable, Resource } from '../common/types';
Expand All @@ -25,8 +25,7 @@ export class ExtensionActivationManager implements IExtensionActivationManager {
@inject(IInterpreterService) private readonly interpreterService: IInterpreterService,
@inject(IInterpreterAutoSelectionService) private readonly autoSelection: IInterpreterAutoSelectionService,
@inject(IApplicationDiagnostics) private readonly appDiagnostics: IApplicationDiagnostics,
@inject(IWorkspaceService) private readonly workspaceService: IWorkspaceService,
@inject(ICommandManager) private readonly commandManager: ICommandManager
@inject(IWorkspaceService) private readonly workspaceService: IWorkspaceService
) {}

public dispose() {
Expand All @@ -42,7 +41,6 @@ export class ExtensionActivationManager implements IExtensionActivationManager {
public async activate(): Promise<void> {
await this.initialize();
await this.activateWorkspace(this.getActiveResource());
await this.commandManager.executeCommand('setContext', 'extensionActivated', true);
await this.autoSelection.autoSelectInterpreter(undefined);
}
@traceDecorators.error('Failed to activate a workspace')
Expand Down
7 changes: 2 additions & 5 deletions src/test/activation/activationManager.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ExtensionActivationManager } from '../../client/activation/activationMa
import { LanguageServerExtensionActivationService } from '../../client/activation/activationService';
import { IExtensionActivationService } from '../../client/activation/types';
import { IApplicationDiagnostics } from '../../client/application/types';
import { ICommandManager, IDocumentManager, IWorkspaceService } from '../../client/common/application/types';
import { IDocumentManager, IWorkspaceService } from '../../client/common/application/types';
import { WorkspaceService } from '../../client/common/application/workspace';
import { PYTHON_LANGUAGE } from '../../client/common/constants';
import { IDisposable } from '../../client/common/types';
Expand Down Expand Up @@ -42,7 +42,6 @@ suite('Activation - ActivationManager', () => {
let autoSelection: typemoq.IMock<IInterpreterAutoSelectionService>;
let interpreterService: IInterpreterService;
let documentManager: typemoq.IMock<IDocumentManager>;
let cmdManager: typemoq.IMock<ICommandManager>;
let activationService1: IExtensionActivationService;
let activationService2: IExtensionActivationService;
setup(() => {
Expand All @@ -51,7 +50,6 @@ suite('Activation - ActivationManager', () => {
autoSelection = typemoq.Mock.ofType<IInterpreterAutoSelectionService>();
interpreterService = mock(InterpreterService);
documentManager = typemoq.Mock.ofType<IDocumentManager>();
cmdManager = typemoq.Mock.ofType<ICommandManager>();
activationService1 = mock(LanguageServerExtensionActivationService);
activationService2 = mock(LanguageServerExtensionActivationService);
managerTest = new ExtensionActivationManagerTest(
Expand All @@ -60,8 +58,7 @@ suite('Activation - ActivationManager', () => {
instance(interpreterService),
autoSelection.object,
appDiagnostics.object,
instance(workspaceService),
cmdManager.object
instance(workspaceService)
);
});
test('Initialize will add event handlers and will dispose them when running dispose', async () => {
Expand Down

0 comments on commit 0f103a9

Please sign in to comment.