Skip to content

Commit

Permalink
Update after code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
sfdctaka committed Feb 29, 2024
1 parent a0a503d commit 50ec68e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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%"
}
]
},
Expand Down
8 changes: 0 additions & 8 deletions src/commands/lint/configureLintingToolsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<boolean> {
try {
Expand Down
8 changes: 7 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 50ec68e

Please sign in to comment.