Classify vscode.search-result as a Feature extension

This commit is contained in:
Jackson Kearl 2019-12-13 16:35:32 -08:00
parent df57a6157c
commit f5bfef2543

View file

@ -49,6 +49,9 @@ import { SeverityIcon } from 'vs/platform/severityIcon/common/severityIcon';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
// Extensions that are automatically classified as Programming Language extensions, but should be Feature extensions
const FORCE_FEATURE_EXTENSIONS = ['vscode.git', 'vscode.search-result'];
class ExtensionsViewState extends Disposable implements IExtensionsViewState {
private readonly _onFocus: Emitter<IExtension> = this._register(new Emitter<IExtension>());
@ -311,7 +314,7 @@ export class ExtensionsListView extends ViewPane {
&& e.local.manifest.contributes
&& Array.isArray(e.local.manifest.contributes.grammars)
&& e.local.manifest.contributes.grammars.length
&& e.local.identifier.id !== 'vscode.git';
&& FORCE_FEATURE_EXTENSIONS.indexOf(e.local.identifier.id) === -1;
});
return this.getPagedModel(this.sortExtensions(basics, options));
}
@ -320,7 +323,7 @@ export class ExtensionsListView extends ViewPane {
return e.local
&& e.local.manifest
&& e.local.manifest.contributes
&& (!Array.isArray(e.local.manifest.contributes.grammars) || e.local.identifier.id === 'vscode.git')
&& (!Array.isArray(e.local.manifest.contributes.grammars) || FORCE_FEATURE_EXTENSIONS.indexOf(e.local.identifier.id) !== -1)
&& !Array.isArray(e.local.manifest.contributes.themes);
});
return this.getPagedModel(this.sortExtensions(others, options));