Merge from vscode de81ccf04849309f843db21130c806a5783678f7 (#4738)

This commit is contained in:
Anthony Dresser
2019-03-28 13:06:16 -07:00
committed by GitHub
parent cc2951265e
commit e6785ffe95
77 changed files with 562 additions and 835 deletions

View File

@@ -91,7 +91,6 @@ export class OpenGlobalSettingsAction extends Action {
export class OpenRemoteSettingsAction extends Action {
static readonly ID = 'workbench.action.openRemoteSettings';
static readonly LABEL = nls.localize('openRemoteSettings', "Open User Settings (Remote)");
constructor(
id: string,

View File

@@ -1220,7 +1220,16 @@ export class SettingsTreeFilter implements ITreeFilter<SettingsTreeElement> {
}
class SettingsTreeDelegate implements IListVirtualDelegate<SettingsTreeGroupChild> {
getHeight(element: SettingsTreeElement): number {
private heightCache = new WeakMap<SettingsTreeGroupChild, number>();
getHeight(element: SettingsTreeGroupChild): number {
const cachedHeight = this.heightCache.get(element);
if (typeof cachedHeight === 'number') {
return cachedHeight;
}
if (element instanceof SettingsTreeGroupElement) {
if (element.isFirstGroup) {
return 31;
@@ -1273,6 +1282,10 @@ class SettingsTreeDelegate implements IListVirtualDelegate<SettingsTreeGroupChil
hasDynamicHeight(element: SettingsTreeGroupElement | SettingsTreeSettingElement | SettingsTreeNewExtensionsElement): boolean {
return !(element instanceof SettingsTreeGroupElement);
}
setDynamicHeight(element: SettingsTreeGroupChild, height: number): void {
this.heightCache.set(element, height);
}
}
class NonCollapsibleObjectTreeModel<T> extends ObjectTreeModel<T> {