mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
More layering (#6541)
* layer unlayered code; fix layering * readd os * fix definition of recommended extensions * protect against tests
This commit is contained in:
@@ -21,6 +21,8 @@ export class ProductService implements IProductService {
|
||||
|
||||
get vscodeVersion(): string { return '1.35.0'; } // {{SQL CARBON EDIT}} add vscodeversion
|
||||
|
||||
get recommendedExtensionsByScenario(): { [area: string]: Array<string> } { return this.productConfiguration.recommendedExtensionsByScenario; }// {{SQL CARBON EDIT}} add getter
|
||||
|
||||
get commit(): string | undefined { return this.productConfiguration ? this.productConfiguration.commit : undefined; }
|
||||
|
||||
get nameLong(): string { return ''; }
|
||||
@@ -48,4 +50,4 @@ export class ProductService implements IProductService {
|
||||
get extensionAllowedBadgeProviders(): readonly string[] | undefined { return this.productConfiguration ? this.productConfiguration.extensionAllowedBadgeProviders : undefined; }
|
||||
|
||||
get aiConfig() { return this.productConfiguration ? this.productConfiguration.aiConfig : undefined; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ export interface IProductService {
|
||||
|
||||
readonly version: string;
|
||||
readonly vscodeVersion: string; // {{SQL CARBON EDIT}} add vscode version
|
||||
readonly recommendedExtensionsByScenario: { [area: string]: Array<string> }; // {{SQL CARBON EDIT}} add getter
|
||||
readonly commit?: string;
|
||||
|
||||
readonly nameLong: string;
|
||||
@@ -74,7 +75,7 @@ export interface IProductConfiguration {
|
||||
};
|
||||
extensionTips: { [id: string]: string; };
|
||||
recommendedExtensions: string[]; // {{SQL CARBON EDIT}}
|
||||
recommendedExtensionsByScenario: string[]; // {{SQL CARBON EDIT}}
|
||||
recommendedExtensionsByScenario: { [area: string]: Array<string> }; // {{SQL CARBON EDIT}}
|
||||
extensionImportantTips: { [id: string]: { name: string; pattern: string; isExtensionPack?: boolean }; };
|
||||
readonly exeBasedExtensionTips: { [id: string]: IExeBasedExtensionTip; };
|
||||
readonly extensionKeywords: { [extension: string]: readonly string[]; };
|
||||
|
||||
@@ -16,6 +16,8 @@ export class ProductService implements IProductService {
|
||||
|
||||
get vscodeVersion(): string { return '1.35.0'; } // {{SQL CARBON EDIT}} add vscodeversion
|
||||
|
||||
get recommendedExtensionsByScenario(): { [area: string]: Array<string> } { return product.recommendedExtensionsByScenario; }// {{SQL CARBON EDIT}} add getter
|
||||
|
||||
get commit(): string | undefined { return product.commit; }
|
||||
|
||||
get nameLong(): string { return product.nameLong; }
|
||||
@@ -41,4 +43,4 @@ export class ProductService implements IProductService {
|
||||
get extensionKeywords(): { [extension: string]: readonly string[]; } | undefined { return product.extensionKeywords; }
|
||||
|
||||
get extensionAllowedBadgeProviders(): readonly string[] | undefined { return product.extensionAllowedBadgeProviders; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorIn
|
||||
import * as CustomInputConverter from 'sql/workbench/common/customInputConverter';
|
||||
import { NotebookInput } from 'sql/workbench/parts/notebook/common/models/notebookInput';
|
||||
import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileEditorInput';
|
||||
import * as path from 'path';
|
||||
import * as path from 'vs/base/common/path';
|
||||
import * as os from 'os';
|
||||
|
||||
const EditorOpenPositioning = {
|
||||
|
||||
@@ -48,8 +48,6 @@ import { IProductService } from 'vs/platform/product/common/product';
|
||||
import { SeverityIcon } from 'vs/platform/severityIcon/common/severityIcon';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
|
||||
import product from 'vs/platform/product/node/product'; // {{SQL CARBON EDIT}}
|
||||
|
||||
|
||||
class ExtensionsViewState extends Disposable implements IExtensionsViewState {
|
||||
|
||||
@@ -429,15 +427,17 @@ export class ExtensionsListView extends ViewletPanel {
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
let promiseRecommendedExtensionsByScenario;
|
||||
Object.keys(product.recommendedExtensionsByScenario).forEach(scenarioType => {
|
||||
let re = new RegExp('@' + scenarioType, 'i');
|
||||
if (re.test(query.value)) {
|
||||
promiseRecommendedExtensionsByScenario = this.getRecommendedExtensionsByScenario(token, scenarioType);
|
||||
if (this.productService) {
|
||||
let promiseRecommendedExtensionsByScenario: Promise<IPagedModel<IExtension>> | undefined;
|
||||
Object.keys(this.productService.recommendedExtensionsByScenario).forEach(scenarioType => {
|
||||
let re = new RegExp('@' + scenarioType, 'i');
|
||||
if (re.test(query.value)) {
|
||||
promiseRecommendedExtensionsByScenario = this.getRecommendedExtensionsByScenario(token, scenarioType);
|
||||
}
|
||||
});
|
||||
if (promiseRecommendedExtensionsByScenario) {
|
||||
return promiseRecommendedExtensionsByScenario;
|
||||
}
|
||||
});
|
||||
if (promiseRecommendedExtensionsByScenario) {
|
||||
return promiseRecommendedExtensionsByScenario;
|
||||
}
|
||||
// {{SQL CARBON EDIT}} - End
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ import product from 'vs/platform/product/node/product';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
// {{SQL CARBON EDIT}}
|
||||
import { ShowRecommendedExtensionsAction, InstallWorkspaceRecommendedExtensionsAction, InstallRecommendedExtensionAction } from 'vs/workbench/contrib/extensions/browser/extensionsActions';
|
||||
import { ShowRecommendedExtensionsByScenarioAction, InstallRecommendedExtensionsByScenarioAction } from 'sql/workbench/contrib/extensions/extensionsActions';
|
||||
import * as Constants from 'sql/workbench/contrib/extensions/constants';
|
||||
import { ShowRecommendedExtensionsByScenarioAction, InstallRecommendedExtensionsByScenarioAction } from 'sql/workbench/contrib/extensions/common/extensionsActions';
|
||||
import * as Constants from 'sql/workbench/contrib/extensions/common/constants';
|
||||
// {{SQL CARBON EDIT}} - End
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { IWorkspaceContextService, IWorkspaceFolder, IWorkspace, IWorkspaceFoldersChangeEvent, WorkbenchState } from 'vs/platform/workspace/common/workspace';
|
||||
@@ -50,7 +50,7 @@ import { extname } from 'vs/base/common/resources';
|
||||
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { IExeBasedExtensionTip } from 'vs/platform/product/common/product';
|
||||
import { timeout } from 'vs/base/common/async';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/telemetry';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import * as TelemetryKeys from 'sql/platform/telemetry/common/telemetryKeys';
|
||||
|
||||
const milliSecondsInADay = 1000 * 60 * 60 * 24;
|
||||
|
||||
@@ -237,8 +237,8 @@ import { DashboardService } from 'sql/platform/dashboard/browser/dashboardServic
|
||||
import { NotebookService } from 'sql/workbench/services/notebook/common/notebookServiceImpl';
|
||||
import { INotebookService } from 'sql/workbench/services/notebook/common/notebookService';
|
||||
import { OEShimService, IOEShimService } from 'sql/workbench/parts/objectExplorer/common/objectExplorerViewTreeShim';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/telemetry';
|
||||
import { AdsTelemetryService } from 'sql/platform/telemetry/adsTelemetryService';
|
||||
import { IAdsTelemetryService } from 'sql/platform/telemetry/common/telemetry';
|
||||
import { AdsTelemetryService } from 'sql/platform/telemetry/common/adsTelemetryService';
|
||||
|
||||
registerSingleton(IDashboardService, DashboardService);
|
||||
registerSingleton(IDashboardViewService, DashboardViewService);
|
||||
@@ -462,6 +462,7 @@ import { IWorkspaceStatsService, WorkspaceStatsService } from 'vs/workbench/cont
|
||||
// {{SQL CARBON EDIT}}
|
||||
// SQL
|
||||
import 'sql/workbench/parts/tasks/browser/tasks.contribution';
|
||||
import 'sql/workbench/update/electron-browser/releaseNotes.contribution';
|
||||
|
||||
// data explorer
|
||||
import 'sql/workbench/parts/dataExplorer/browser/dataExplorer.contribution';
|
||||
|
||||
Reference in New Issue
Block a user