diff --git a/package.json b/package.json index 56b4465..b3d3d8a 100644 --- a/package.json +++ b/package.json @@ -52,8 +52,7 @@ { "command": "salesforcedx-vscode-offline-app.configureLintingTools", "title": "%extension.commands.config-linting-tools.title%", - "category": "%extension.commands.config-wizard.category%", - "when": "sfdx_project_opened" + "category": "%extension.commands.config-wizard.category%" } ] }, diff --git a/src/commands/lint/configureLintingToolsCommand.ts b/src/commands/lint/configureLintingToolsCommand.ts index f306e61..3fd39af 100644 --- a/src/commands/lint/configureLintingToolsCommand.ts +++ b/src/commands/lint/configureLintingToolsCommand.ts @@ -31,14 +31,6 @@ enum MessageType { InformationOk } -export function onActivate(context: ExtensionContext) { - commands.executeCommand( - 'setContext', - 'sfdx_project_opened', - WorkspaceUtils.isSfdxProjectOpened() - ); -} - export class ConfigureLintingToolsCommand { static async configure(): Promise { try { diff --git a/src/extension.ts b/src/extension.ts index a131f76..638cb7f 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -11,6 +11,7 @@ import * as vscode from 'vscode'; import * as onboardingWizard from './commands/wizard/onboardingWizard'; import * as configureLintingToolsCommand from './commands/lint/configureLintingToolsCommand'; import { CoreExtensionService } from './services/CoreExtensionService'; +import { WorkspaceUtils } from './utils/workspaceUtils'; export function activate(context: vscode.ExtensionContext) { // We need to do this first in case any other services need access to those provided by the core extension @@ -27,11 +28,16 @@ export function activate(context: vscode.ExtensionContext) { return; } + vscode.commands.executeCommand( + 'setContext', + 'sfdx_project_opened', + WorkspaceUtils.isSfdxProjectOpened() + ); + onboardingWizard.registerCommand(context); onboardingWizard.onActivate(context); configureLintingToolsCommand.registerCommand(context); - configureLintingToolsCommand.onActivate(context); } // This method is called when your extension is deactivated