mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
respect ignore recommendation setting for recommendation scenario as well (#16979)
This commit is contained in:
@@ -17,6 +17,7 @@ import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
|||||||
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||||
import { InstallRecommendedExtensionsByScenarioAction, ShowRecommendedExtensionsByScenarioAction } from 'sql/workbench/contrib/extensions/browser/extensionsActions';
|
import { InstallRecommendedExtensionsByScenarioAction, ShowRecommendedExtensionsByScenarioAction } from 'sql/workbench/contrib/extensions/browser/extensionsActions';
|
||||||
import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
|
import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||||
|
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||||
|
|
||||||
const choiceNever = localize('neverShowAgain', "Don't Show Again");
|
const choiceNever = localize('neverShowAgain', "Don't Show Again");
|
||||||
|
|
||||||
@@ -32,7 +33,8 @@ export class ScenarioRecommendations extends ExtensionRecommendations {
|
|||||||
@IStorageService private readonly storageService?: IStorageService,
|
@IStorageService private readonly storageService?: IStorageService,
|
||||||
@IExtensionManagementService protected readonly extensionManagementService?: IExtensionManagementService,
|
@IExtensionManagementService protected readonly extensionManagementService?: IExtensionManagementService,
|
||||||
@IAdsTelemetryService private readonly adsTelemetryService?: IAdsTelemetryService,
|
@IAdsTelemetryService private readonly adsTelemetryService?: IAdsTelemetryService,
|
||||||
@IExtensionsWorkbenchService protected readonly extensionsWorkbenchService?: IExtensionsWorkbenchService
|
@IExtensionsWorkbenchService protected readonly extensionsWorkbenchService?: IExtensionsWorkbenchService,
|
||||||
|
@IConfigurationService private readonly configurationService?: IConfigurationService
|
||||||
|
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
@@ -42,11 +44,15 @@ export class ScenarioRecommendations extends ExtensionRecommendations {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
private ignoreRecommendations(): boolean {
|
||||||
|
const ignoreRecommendations = this.configurationService.getValue<boolean>('extensions.ignoreRecommendations');
|
||||||
|
return ignoreRecommendations;
|
||||||
|
}
|
||||||
|
|
||||||
promptRecommendedExtensionsByScenario(scenarioType: string): void {
|
promptRecommendedExtensionsByScenario(scenarioType: string): void {
|
||||||
const storageKey = 'extensionAssistant/RecommendationsIgnore/' + scenarioType;
|
const storageKey = 'extensionAssistant/RecommendationsIgnore/' + scenarioType;
|
||||||
|
|
||||||
if (this.storageService.getBoolean(storageKey, StorageScope.GLOBAL, false)) {
|
if (this.storageService.getBoolean(storageKey, StorageScope.GLOBAL, false) || this.ignoreRecommendations()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user