mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
This reverts commit 90054ae22f.
This commit is contained in:
@@ -24,7 +24,6 @@ import { ThemeIcon } from 'vs/platform/theme/common/themeService';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { Iterable } from 'vs/base/common/iterator';
|
||||
|
||||
|
||||
export type ServicesAccessor = InstantiationServicesAccessor;
|
||||
@@ -491,15 +490,15 @@ export namespace EditorExtensionsRegistry {
|
||||
return EditorContributionRegistry.INSTANCE.getEditorActions();
|
||||
}
|
||||
|
||||
export function getEditorContributions(): Iterable<IEditorContributionDescription> {
|
||||
export function getEditorContributions(): IEditorContributionDescription[] {
|
||||
return EditorContributionRegistry.INSTANCE.getEditorContributions();
|
||||
}
|
||||
|
||||
export function getSomeEditorContributions(ids: string[]): Iterable<IEditorContributionDescription> {
|
||||
return Iterable.filter(EditorContributionRegistry.INSTANCE.getEditorContributions(), c => ids.indexOf(c.id) >= 0);
|
||||
export function getSomeEditorContributions(ids: string[]): IEditorContributionDescription[] {
|
||||
return EditorContributionRegistry.INSTANCE.getEditorContributions().filter(c => ids.indexOf(c.id) >= 0);
|
||||
}
|
||||
|
||||
export function getDiffEditorContributions(): Iterable<IDiffEditorContributionDescription> {
|
||||
export function getDiffEditorContributions(): IDiffEditorContributionDescription[] {
|
||||
return EditorContributionRegistry.INSTANCE.getDiffEditorContributions();
|
||||
}
|
||||
}
|
||||
@@ -529,16 +528,16 @@ class EditorContributionRegistry {
|
||||
this.editorContributions.push({ id, ctor: ctor as IEditorContributionCtor });
|
||||
}
|
||||
|
||||
public getEditorContributions(): Iterable<IEditorContributionDescription> {
|
||||
return this.editorContributions;
|
||||
public getEditorContributions(): IEditorContributionDescription[] {
|
||||
return this.editorContributions.slice(0);
|
||||
}
|
||||
|
||||
public registerDiffEditorContribution<Services extends BrandedService[]>(id: string, ctor: { new(editor: IDiffEditor, ...services: Services): IEditorContribution }): void {
|
||||
this.diffEditorContributions.push({ id, ctor: ctor as IDiffEditorContributionCtor });
|
||||
}
|
||||
|
||||
public getDiffEditorContributions(): Iterable<IDiffEditorContributionDescription> {
|
||||
return this.diffEditorContributions;
|
||||
public getDiffEditorContributions(): IDiffEditorContributionDescription[] {
|
||||
return this.diffEditorContributions.slice(0);
|
||||
}
|
||||
|
||||
public registerEditorAction(action: EditorAction) {
|
||||
|
||||
Reference in New Issue
Block a user