Skip to content

Commit 6648df1

Browse files
committed
1 parent 038057b commit 6648df1

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/vs/workbench/contrib/extensions/electron-browser/runtimeExtensionsEditor.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,17 @@ export class RuntimeExtensionsEditor extends BaseEditor {
164164
this._register(this._extensionService.onDidChangeExtensionsStatus(() => this._updateSoon.schedule()));
165165
}
166166

167-
private _updateExtensions(): void {
168-
this._elements = this._resolveExtensions();
167+
private async _updateExtensions(): Promise<void> {
168+
this._elements = await this._resolveExtensions();
169169
if (this._list) {
170170
this._list.splice(0, this._list.length, this._elements);
171171
}
172172
}
173173

174-
private _resolveExtensions(): IRuntimeExtension[] {
174+
private async _resolveExtensions(): Promise<IRuntimeExtension[]> {
175175
let marketplaceMap: { [id: string]: IExtension; } = Object.create(null);
176-
for (let extension of this._extensionsWorkbenchService.local) {
176+
const marketPlaceExtensions = await this._extensionsWorkbenchService.queryLocal();
177+
for (let extension of marketPlaceExtensions) {
177178
marketplaceMap[ExtensionIdentifier.toKey(extension.identifier.id)] = extension;
178179
}
179180

@@ -328,7 +329,7 @@ export class RuntimeExtensionsEditor extends BaseEditor {
328329
} else {
329330
data.icon.style.visibility = 'inherit';
330331
}
331-
data.name.textContent = element.marketplaceInfo ? element.marketplaceInfo.displayName : element.description.displayName || '';
332+
data.name.textContent = element.marketplaceInfo.displayName;
332333
data.version.textContent = element.description.version;
333334

334335
const activationTimes = element.status.activationTimes!;
@@ -462,11 +463,10 @@ export class RuntimeExtensionsEditor extends BaseEditor {
462463
actions.push(new ReportExtensionIssueAction(e.element, this._openerService, this._clipboardService, this._productService));
463464
actions.push(new Separator());
464465

465-
if (e.element.marketplaceInfo) {
466-
actions.push(new Action('runtimeExtensionsEditor.action.disableWorkspace', nls.localize('disable workspace', "Disable (Workspace)"), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element!.marketplaceInfo, EnablementState.DisabledWorkspace)));
467-
actions.push(new Action('runtimeExtensionsEditor.action.disable', nls.localize('disable', "Disable"), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element!.marketplaceInfo, EnablementState.DisabledGlobally)));
468-
actions.push(new Separator());
469-
}
466+
actions.push(new Action('runtimeExtensionsEditor.action.disableWorkspace', nls.localize('disable workspace', "Disable (Workspace)"), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element!.marketplaceInfo, EnablementState.DisabledWorkspace)));
467+
actions.push(new Action('runtimeExtensionsEditor.action.disable', nls.localize('disable', "Disable"), undefined, true, () => this._extensionsWorkbenchService.setEnablement(e.element!.marketplaceInfo, EnablementState.DisabledGlobally)));
468+
actions.push(new Separator());
469+
470470
const state = this._extensionHostProfileService.state;
471471
if (state === ProfileSessionState.Running) {
472472
actions.push(this._instantiationService.createInstance(StopExtensionHostProfileAction, StopExtensionHostProfileAction.ID, StopExtensionHostProfileAction.LABEL));

0 commit comments

Comments
 (0)