mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 01:00:29 -04:00
More layering (#6541)
* layer unlayered code; fix layering * readd os * fix definition of recommended extensions * protect against tests
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user