提交 cd9f8897 编写于 作者: M Martin Aeschlimann

Rename INewConstructorSignature to IConstructorSignature

上级 802111cc
......@@ -8,7 +8,7 @@ import {IEmitterEvent, IEventEmitter} from 'vs/base/common/eventEmitter';
import {IDisposable} from 'vs/base/common/lifecycle';
import {IKeyboardEvent} from 'vs/base/browser/keyboardEvent';
import {IMouseEvent} from 'vs/base/browser/mouseEvent';
import {IInstantiationService, INewConstructorSignature1} from 'vs/platform/instantiation/common/instantiation';
import {IInstantiationService, IConstructorSignature1} from 'vs/platform/instantiation/common/instantiation';
import * as editorCommon from 'vs/editor/common/editorCommon';
export interface IDynamicViewOverlay extends IDisposable {
......@@ -475,7 +475,7 @@ export interface IEditorMouseEvent {
target: IMouseTarget;
}
export type ISimpleEditorContributionCtor = INewConstructorSignature1<ICodeEditor, editorCommon.IEditorContribution>;
export type ISimpleEditorContributionCtor = IConstructorSignature1<ICodeEditor, editorCommon.IEditorContribution>;
/**
* An editor contribution descriptor that will be used to construct editor contributions
......
......@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import {IInstantiationService, INewConstructorSignature1} from 'vs/platform/instantiation/common/instantiation';
import {IInstantiationService, IConstructorSignature1} from 'vs/platform/instantiation/common/instantiation';
import {Registry} from 'vs/platform/platform';
import {IEditorContribution} from 'vs/editor/common/editorCommon';
import {ICodeEditor, IEditorContributionDescriptor, ISimpleEditorContributionCtor} from 'vs/editor/browser/editorBrowser';
......@@ -28,7 +28,7 @@ class SimpleEditorContributionDescriptor implements IEditorContributionDescripto
public createInstance(instantiationService:IInstantiationService, editor:ICodeEditor): IEditorContribution {
// cast added to help the compiler, can remove once IConstructorSignature1 has been removed
return instantiationService.createInstance(<INewConstructorSignature1<ICodeEditor, IEditorContribution>> this._ctor, editor);
return instantiationService.createInstance(<IConstructorSignature1<ICodeEditor, IEditorContribution>> this._ctor, editor);
}
}
......
......@@ -12,7 +12,7 @@ import {KeyCode, KeyMod} from 'vs/base/common/keyCodes';
import {IDisposable} from 'vs/base/common/lifecycle';
import URI from 'vs/base/common/uri';
import {TPromise} from 'vs/base/common/winjs.base';
import {IInstantiationService, INewConstructorSignature1, INewConstructorSignature2} from 'vs/platform/instantiation/common/instantiation';
import {IInstantiationService, IConstructorSignature1, IConstructorSignature2} from 'vs/platform/instantiation/common/instantiation';
import * as TokensBinaryEncoding from 'vs/editor/common/model/tokensBinaryEncoding';
import {ILineContext, IMode, IModeTransition, IToken} from 'vs/editor/common/modes';
......@@ -2748,9 +2748,9 @@ export interface IEditorActionDescriptorData {
label:string;
}
export type IEditorActionContributionCtor = INewConstructorSignature2<IEditorActionDescriptorData, ICommonCodeEditor, IEditorContribution>;
export type IEditorActionContributionCtor = IConstructorSignature2<IEditorActionDescriptorData, ICommonCodeEditor, IEditorContribution>;
export type ICommonEditorContributionCtor = INewConstructorSignature1<ICommonCodeEditor, IEditorContribution>;
export type ICommonEditorContributionCtor = IConstructorSignature1<ICommonCodeEditor, IEditorContribution>;
/**
* An editor contribution descriptor that will be used to construct editor contributions
......
......@@ -31,7 +31,7 @@ export class SyncActionDescriptor {
private _keybindingContext: KbExpr;
private _keybindingWeight: number;
constructor(ctor: Instantiation.INewConstructorSignature2<string, string, Actions.Action>,
constructor(ctor: Instantiation.IConstructorSignature2<string, string, Actions.Action>,
id: string, label: string, keybindings?: IKeybindings, keybindingContext?: KbExpr, keybindingWeight?: number
) {
this._id = id;
......
......@@ -70,59 +70,59 @@ export class SyncDescriptor<T> extends AbstractDescriptor<T> implements objects.
export interface CreateSyncFunc {
<T>(ctor: instantiation.INewConstructorSignature0<T>): SyncDescriptor0<T>;
<A1, T>(ctor: instantiation.INewConstructorSignature1<A1, T>): SyncDescriptor1<A1, T>;
<A1, T>(ctor: instantiation.INewConstructorSignature1<A1, T>, a1: A1): SyncDescriptor0<T>;
<A1, A2, T>(ctor: instantiation.INewConstructorSignature2<A1, A2, T>): SyncDescriptor2<A1, A2, T>;
<A1, A2, T>(ctor: instantiation.INewConstructorSignature2<A1, A2, T>, a1: A1): SyncDescriptor1<A2, T>;
<A1, A2, T>(ctor: instantiation.INewConstructorSignature2<A1, A2, T>, a1: A1, a2: A2): SyncDescriptor0<T>;
<A1, A2, A3, T>(ctor: instantiation.INewConstructorSignature3<A1, A2, A3, T>): SyncDescriptor3<A1, A2, A3, T>;
<A1, A2, A3, T>(ctor: instantiation.INewConstructorSignature3<A1, A2, A3, T>, a1: A1): SyncDescriptor2<A2, A3, T>;
<A1, A2, A3, T>(ctor: instantiation.INewConstructorSignature3<A1, A2, A3, T>, a1: A1, a2: A2): SyncDescriptor1<A3, T>;
<A1, A2, A3, T>(ctor: instantiation.INewConstructorSignature3<A1, A2, A3, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor0<T>;
<A1, A2, A3, A4, T>(ctor: instantiation.INewConstructorSignature4<A1, A2, A3, A4, T>): SyncDescriptor4<A1, A2, A3, A4, T>;
<A1, A2, A3, A4, T>(ctor: instantiation.INewConstructorSignature4<A1, A2, A3, A4, T>, a1: A1): SyncDescriptor3<A2, A3, A4, T>;
<A1, A2, A3, A4, T>(ctor: instantiation.INewConstructorSignature4<A1, A2, A3, A4, T>, a1: A1, a2: A2): SyncDescriptor2<A3, A4, T>;
<A1, A2, A3, A4, T>(ctor: instantiation.INewConstructorSignature4<A1, A2, A3, A4, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor1<A4, T>;
<A1, A2, A3, A4, T>(ctor: instantiation.INewConstructorSignature4<A1, A2, A3, A4, T>, a1: A1, a2: A2, a3: A3, a4: A4): SyncDescriptor0<T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.INewConstructorSignature5<A1, A2, A3, A4, A5, T>): SyncDescriptor5<A1, A2, A3, A4, A5, T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.INewConstructorSignature5<A1, A2, A3, A4, A5, T>, a1: A1): SyncDescriptor4<A2, A3, A4, A5, T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.INewConstructorSignature5<A1, A2, A3, A4, A5, T>, a1: A1, a2: A2): SyncDescriptor3<A3, A4, A5, T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.INewConstructorSignature5<A1, A2, A3, A4, A5, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor2<A4, A5, T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.INewConstructorSignature5<A1, A2, A3, A4, A5, T>, a1: A1, a2: A2, a3: A3, a4: A4): SyncDescriptor1<A5, T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.INewConstructorSignature5<A1, A2, A3, A4, A5, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): SyncDescriptor0<T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.INewConstructorSignature6<A1, A2, A3, A4, A5, A6, T>): SyncDescriptor6<A1, A2, A3, A4, A5, A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.INewConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1): SyncDescriptor5<A2, A3, A4, A5, A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.INewConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1, a2: A2): SyncDescriptor4<A3, A4, A5, A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.INewConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor3<A4, A5, A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.INewConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1, a2: A2, a3: A3, a4: A4): SyncDescriptor2<A5, A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.INewConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): SyncDescriptor1<A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.INewConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6): SyncDescriptor0<T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>): SyncDescriptor7<A1, A2, A3, A4, A5, A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1): SyncDescriptor6<A2, A3, A4, A5, A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2): SyncDescriptor5<A3, A4, A5, A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor4<A4, A5, A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3, a4: A4): SyncDescriptor3<A5, A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): SyncDescriptor2<A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6): SyncDescriptor1<A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7): SyncDescriptor0<T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>): SyncDescriptor8<A1, A2, A3, A4, A5, A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1): SyncDescriptor7<A2, A3, A4, A5, A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2): SyncDescriptor6<A3, A4, A5, A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor5<A4, A5, A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4): SyncDescriptor4<A5, A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): SyncDescriptor3<A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6): SyncDescriptor2<A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7): SyncDescriptor1<A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7, a8: A8): SyncDescriptor0<T>;
<T>(ctor: instantiation.IConstructorSignature0<T>): SyncDescriptor0<T>;
<A1, T>(ctor: instantiation.IConstructorSignature1<A1, T>): SyncDescriptor1<A1, T>;
<A1, T>(ctor: instantiation.IConstructorSignature1<A1, T>, a1: A1): SyncDescriptor0<T>;
<A1, A2, T>(ctor: instantiation.IConstructorSignature2<A1, A2, T>): SyncDescriptor2<A1, A2, T>;
<A1, A2, T>(ctor: instantiation.IConstructorSignature2<A1, A2, T>, a1: A1): SyncDescriptor1<A2, T>;
<A1, A2, T>(ctor: instantiation.IConstructorSignature2<A1, A2, T>, a1: A1, a2: A2): SyncDescriptor0<T>;
<A1, A2, A3, T>(ctor: instantiation.IConstructorSignature3<A1, A2, A3, T>): SyncDescriptor3<A1, A2, A3, T>;
<A1, A2, A3, T>(ctor: instantiation.IConstructorSignature3<A1, A2, A3, T>, a1: A1): SyncDescriptor2<A2, A3, T>;
<A1, A2, A3, T>(ctor: instantiation.IConstructorSignature3<A1, A2, A3, T>, a1: A1, a2: A2): SyncDescriptor1<A3, T>;
<A1, A2, A3, T>(ctor: instantiation.IConstructorSignature3<A1, A2, A3, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor0<T>;
<A1, A2, A3, A4, T>(ctor: instantiation.IConstructorSignature4<A1, A2, A3, A4, T>): SyncDescriptor4<A1, A2, A3, A4, T>;
<A1, A2, A3, A4, T>(ctor: instantiation.IConstructorSignature4<A1, A2, A3, A4, T>, a1: A1): SyncDescriptor3<A2, A3, A4, T>;
<A1, A2, A3, A4, T>(ctor: instantiation.IConstructorSignature4<A1, A2, A3, A4, T>, a1: A1, a2: A2): SyncDescriptor2<A3, A4, T>;
<A1, A2, A3, A4, T>(ctor: instantiation.IConstructorSignature4<A1, A2, A3, A4, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor1<A4, T>;
<A1, A2, A3, A4, T>(ctor: instantiation.IConstructorSignature4<A1, A2, A3, A4, T>, a1: A1, a2: A2, a3: A3, a4: A4): SyncDescriptor0<T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.IConstructorSignature5<A1, A2, A3, A4, A5, T>): SyncDescriptor5<A1, A2, A3, A4, A5, T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.IConstructorSignature5<A1, A2, A3, A4, A5, T>, a1: A1): SyncDescriptor4<A2, A3, A4, A5, T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.IConstructorSignature5<A1, A2, A3, A4, A5, T>, a1: A1, a2: A2): SyncDescriptor3<A3, A4, A5, T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.IConstructorSignature5<A1, A2, A3, A4, A5, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor2<A4, A5, T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.IConstructorSignature5<A1, A2, A3, A4, A5, T>, a1: A1, a2: A2, a3: A3, a4: A4): SyncDescriptor1<A5, T>;
<A1, A2, A3, A4, A5, T>(ctor: instantiation.IConstructorSignature5<A1, A2, A3, A4, A5, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): SyncDescriptor0<T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.IConstructorSignature6<A1, A2, A3, A4, A5, A6, T>): SyncDescriptor6<A1, A2, A3, A4, A5, A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.IConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1): SyncDescriptor5<A2, A3, A4, A5, A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.IConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1, a2: A2): SyncDescriptor4<A3, A4, A5, A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.IConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor3<A4, A5, A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.IConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1, a2: A2, a3: A3, a4: A4): SyncDescriptor2<A5, A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.IConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): SyncDescriptor1<A6, T>;
<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.IConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6): SyncDescriptor0<T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>): SyncDescriptor7<A1, A2, A3, A4, A5, A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1): SyncDescriptor6<A2, A3, A4, A5, A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2): SyncDescriptor5<A3, A4, A5, A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor4<A4, A5, A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3, a4: A4): SyncDescriptor3<A5, A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): SyncDescriptor2<A6, A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6): SyncDescriptor1<A7, T>;
<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7): SyncDescriptor0<T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>): SyncDescriptor8<A1, A2, A3, A4, A5, A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1): SyncDescriptor7<A2, A3, A4, A5, A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2): SyncDescriptor6<A3, A4, A5, A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3): SyncDescriptor5<A4, A5, A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4): SyncDescriptor4<A5, A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): SyncDescriptor3<A6, A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6): SyncDescriptor2<A7, A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7): SyncDescriptor1<A8, T>;
<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7, a8: A8): SyncDescriptor0<T>;
}
export const createSyncDescriptor: CreateSyncFunc = <T>(ctor: any, ...staticArguments: any[]): any => {
return new SyncDescriptor<T>(ctor, ...staticArguments);
......
......@@ -5,7 +5,7 @@
'use strict';
import {SyncDescriptor} from './descriptors';
import {ServiceIdentifier, INewConstructorSignature0} from './instantiation';
import {ServiceIdentifier, IConstructorSignature0} from './instantiation';
export const Services = 'di.services';
......@@ -16,7 +16,7 @@ export interface IServiceContribution<T> {
const _registry: IServiceContribution<any>[] = [];
export function registerSingleton<T>(id: ServiceIdentifier<T>, ctor: INewConstructorSignature0<T>): void {
export function registerSingleton<T>(id: ServiceIdentifier<T>, ctor: IConstructorSignature0<T>): void {
_registry.push({ id, descriptor: new SyncDescriptor<T>(ctor) });
}
......
......@@ -27,39 +27,39 @@ export namespace _util {
// ----------------------- interfaces -----------------------
export interface INewConstructorSignature0<T> {
export interface IConstructorSignature0<T> {
new (...services: { serviceId: ServiceIdentifier<any>; }[]): T;
}
export interface INewConstructorSignature1<A1, T> {
export interface IConstructorSignature1<A1, T> {
new (first: A1, ...services: { serviceId: ServiceIdentifier<any>; }[]): T;
}
export interface INewConstructorSignature2<A1, A2, T> {
export interface IConstructorSignature2<A1, A2, T> {
new (first: A1, second: A2, ...services: { serviceId: ServiceIdentifier<any>; }[]): T;
}
export interface INewConstructorSignature3<A1, A2, A3, T> {
export interface IConstructorSignature3<A1, A2, A3, T> {
new (first: A1, second: A2, third: A3, ...services: { serviceId: ServiceIdentifier<any>; }[]): T;
}
export interface INewConstructorSignature4<A1, A2, A3, A4, T> {
export interface IConstructorSignature4<A1, A2, A3, A4, T> {
new (first: A1, second: A2, third: A3, forth: A4, ...services: { serviceId: ServiceIdentifier<any>; }[]): T;
}
export interface INewConstructorSignature5<A1, A2, A3, A4, A5, T> {
export interface IConstructorSignature5<A1, A2, A3, A4, A5, T> {
new (first: A1, second: A2, third: A3, forth: A4, fifth: A5, ...services: { serviceId: ServiceIdentifier<any>; }[]): T;
}
export interface INewConstructorSignature6<A1, A2, A3, A4, A5, A6, T> {
export interface IConstructorSignature6<A1, A2, A3, A4, A5, A6, T> {
new (first: A1, second: A2, third: A3, forth: A4, fifth: A5, sixth: A6, ...services: { serviceId: ServiceIdentifier<any>; }[]): T;
}
export interface INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T> {
export interface IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T> {
new (first: A1, second: A2, third: A3, forth: A4, fifth: A5, sixth: A6, seventh: A7, ...services: { serviceId: ServiceIdentifier<any>; }[]): T;
}
export interface INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T> {
export interface IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T> {
new (first: A1, second: A2, third: A3, forth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8, ...services: { serviceId: ServiceIdentifier<any>; }[]): T;
}
......@@ -117,7 +117,7 @@ export interface IInstantiationService {
*/
getInstance<T>(id: ServiceIdentifier<T>): T;
/**
* Synchronously creates an instance that is denoted by
* the descriptor
......@@ -132,15 +132,15 @@ export interface IInstantiationService {
createInstance<A1, A2, A3, A4, A5, A6, A7, T>(descriptor: descriptors.SyncDescriptor7<A1, A2, A3, A4, A5, A6, A7, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7): T;
createInstance<A1, A2, A3, A4, A5, A6, A7, A8, T>(descriptor: descriptors.SyncDescriptor8<A1, A2, A3, A4, A5, A6, A7, A8, T>, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5, a6: A6, a7: A7, a8: A8): T;
createInstance<T>(ctor: INewConstructorSignature0<T>): T;
createInstance<A1, T>(ctor: INewConstructorSignature1<A1, T>, first: A1): T;
createInstance<A1, A2, T>(ctor: INewConstructorSignature2<A1, A2, T>, first: A1, second: A2): T;
createInstance<A1, A2, A3, T>(ctor: INewConstructorSignature3<A1, A2, A3, T>, first: A1, second: A2, third: A3): T;
createInstance<A1, A2, A3, A4, T>(ctor: INewConstructorSignature4<A1, A2, A3, A4, T>, first: A1, second: A2, third: A3, fourth: A4): T;
createInstance<A1, A2, A3, A4, A5, T>(ctor: INewConstructorSignature5<A1, A2, A3, A4, A5, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5): T;
createInstance<A1, A2, A3, A4, A5, A6, T>(ctor: INewConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6): T;
createInstance<A1, A2, A3, A4, A5, A6, A7, T>(ctor: INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7): T;
createInstance<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8): T;
createInstance<T>(ctor: IConstructorSignature0<T>): T;
createInstance<A1, T>(ctor: IConstructorSignature1<A1, T>, first: A1): T;
createInstance<A1, A2, T>(ctor: IConstructorSignature2<A1, A2, T>, first: A1, second: A2): T;
createInstance<A1, A2, A3, T>(ctor: IConstructorSignature3<A1, A2, A3, T>, first: A1, second: A2, third: A3): T;
createInstance<A1, A2, A3, A4, T>(ctor: IConstructorSignature4<A1, A2, A3, A4, T>, first: A1, second: A2, third: A3, fourth: A4): T;
createInstance<A1, A2, A3, A4, A5, T>(ctor: IConstructorSignature5<A1, A2, A3, A4, A5, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5): T;
createInstance<A1, A2, A3, A4, A5, A6, T>(ctor: IConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6): T;
createInstance<A1, A2, A3, A4, A5, A6, A7, T>(ctor: IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7): T;
createInstance<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8): T;
/**
* Asynchronously creates an instance that is denoted by
......
......@@ -207,7 +207,10 @@ class ServicesMap {
allArguments = [descriptor.ctor, this /*this === ctx*/];
allArguments.push.apply(allArguments, descriptor.staticArguments());
allArguments.push.apply(allArguments, args);
console.warn('using OLD INJECTION STYLE for ' + descriptor.ctor.name);
if (allArguments.length > 1) {
console.warn('using OLD INJECTION STYLE for ' + descriptor.ctor.name);
}
}
return this._lock.runUnlocked(() => {
......@@ -255,16 +258,16 @@ class InstantiationService implements IInstantiationService {
let result = this._servicesMap.lock.runUnlocked(() => this._servicesMap[name]);
return result;
}
createInstance<T>(ctor: instantiation.INewConstructorSignature0<T>, ...rest: any[]): T;
createInstance<A1, T>(ctor: instantiation.INewConstructorSignature1<A1, T>, ...rest: any[]): T;
createInstance<A1, A2, T>(ctor: instantiation.INewConstructorSignature2<A1, A2, T>, ...rest: any[]): T;
createInstance<A1, A2, A3, T>(ctor: instantiation.INewConstructorSignature3<A1, A2, A3, T>, ...rest: any[]): T;
createInstance<A1, A2, A3, A4, T>(ctor: instantiation.INewConstructorSignature4<A1, A2, A3, A4, T>, first: A1, second: A2, third: A3, fourth: A4): T;
createInstance<A1, A2, A3, A4, A5, T>(ctor: instantiation.INewConstructorSignature5<A1, A2, A3, A4, A5, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5): T;
createInstance<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.INewConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6): T;
createInstance<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.INewConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7): T;
createInstance<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.INewConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8): T;
createInstance<T>(ctor: instantiation.IConstructorSignature0<T>, ...rest: any[]): T;
createInstance<A1, T>(ctor: instantiation.IConstructorSignature1<A1, T>, ...rest: any[]): T;
createInstance<A1, A2, T>(ctor: instantiation.IConstructorSignature2<A1, A2, T>, ...rest: any[]): T;
createInstance<A1, A2, A3, T>(ctor: instantiation.IConstructorSignature3<A1, A2, A3, T>, ...rest: any[]): T;
createInstance<A1, A2, A3, A4, T>(ctor: instantiation.IConstructorSignature4<A1, A2, A3, A4, T>, first: A1, second: A2, third: A3, fourth: A4): T;
createInstance<A1, A2, A3, A4, A5, T>(ctor: instantiation.IConstructorSignature5<A1, A2, A3, A4, A5, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5): T;
createInstance<A1, A2, A3, A4, A5, A6, T>(ctor: instantiation.IConstructorSignature6<A1, A2, A3, A4, A5, A6, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6): T;
createInstance<A1, A2, A3, A4, A5, A6, A7, T>(ctor: instantiation.IConstructorSignature7<A1, A2, A3, A4, A5, A6, A7, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7): T;
createInstance<A1, A2, A3, A4, A5, A6, A7, A8, T>(ctor: instantiation.IConstructorSignature8<A1, A2, A3, A4, A5, A6, A7, A8, T>, first: A1, second: A2, third: A3, fourth: A4, fifth: A5, sixth: A6, seventh: A7, eigth: A8): T;
createInstance<T>(descriptor: descriptors.SyncDescriptor0<T>): T;
createInstance<A1, T>(descriptor: descriptors.SyncDescriptor1<A1, T>, a1: A1): T;
......@@ -300,7 +303,7 @@ class InstantiationService implements IInstantiationService {
} else if (param instanceof descriptors.AsyncDescriptor) {
return this._createInstanceAsync(<descriptors.AsyncDescriptor<T>>param, rest);
} else {
return this._servicesMap.createInstance(new descriptors.SyncDescriptor(<instantiation.INewConstructorSignature0<T>>param), rest);
return this._servicesMap.createInstance(new descriptors.SyncDescriptor(<instantiation.IConstructorSignature0<T>>param), rest);
}
}
......
......@@ -6,7 +6,7 @@
import Types = require('vs/base/common/types');
import Assert = require('vs/base/common/assert');
import {IInstantiationService, INewConstructorSignature0} from 'vs/platform/instantiation/common/instantiation';
import {IInstantiationService, IConstructorSignature0} from 'vs/platform/instantiation/common/instantiation';
export interface IRegistry {
......@@ -62,7 +62,7 @@ export var Registry = <IRegistry>new RegistryImpl();
* A base class for registries that leverage the instantiation service to create instances.
*/
export class BaseRegistry<T> {
private toBeInstantiated: INewConstructorSignature0<T>[] = [];
private toBeInstantiated: IConstructorSignature0<T>[] = [];
private instances: T[] = [];
private instantiationService: IInstantiationService;
......@@ -75,12 +75,12 @@ export class BaseRegistry<T> {
}
}
private instantiate(ctor: INewConstructorSignature0<T>): void {
private instantiate(ctor: IConstructorSignature0<T>): void {
let instance = this.instantiationService.createInstance(ctor);
this.instances.push(instance);
}
_register(ctor: INewConstructorSignature0<T>): void {
_register(ctor: IConstructorSignature0<T>): void {
if (this.instantiationService) {
this.instantiate(ctor);
} else {
......
......@@ -34,10 +34,10 @@ export abstract class AbstractThreadService implements remote.IManyHandler {
this._instantiationService = service;
}
createInstance<T extends IThreadSynchronizableObject>(ctor: instantiation.INewConstructorSignature0<T>): T;
createInstance<A1, T extends IThreadSynchronizableObject>(ctor: instantiation.INewConstructorSignature1<A1, T>, a1: A1): T;
createInstance<A1, A2, T extends IThreadSynchronizableObject>(ctor: instantiation.INewConstructorSignature2<A1, A2, T>, a1: A1, a2: A2): T;
createInstance<A1, A2, A3, T extends IThreadSynchronizableObject>(ctor: instantiation.INewConstructorSignature3<A1, A2, A3, T>, a1: A1, a2: A2, a3: A3): T;
createInstance<T extends IThreadSynchronizableObject>(ctor: instantiation.IConstructorSignature0<T>): T;
createInstance<A1, T extends IThreadSynchronizableObject>(ctor: instantiation.IConstructorSignature1<A1, T>, a1: A1): T;
createInstance<A1, A2, T extends IThreadSynchronizableObject>(ctor: instantiation.IConstructorSignature2<A1, A2, T>, a1: A1, a2: A2): T;
createInstance<A1, A2, A3, T extends IThreadSynchronizableObject>(ctor: instantiation.IConstructorSignature3<A1, A2, A3, T>, a1: A1, a2: A2, a3: A3): T;
createInstance<T extends IThreadSynchronizableObject>(descriptor: AsyncDescriptor0<T>): T;
createInstance<A1, T extends IThreadSynchronizableObject>(descriptor: AsyncDescriptor1<A1, T>, a1: A1): T;
......@@ -130,7 +130,7 @@ export abstract class AbstractThreadService implements remote.IManyHandler {
return result;
}
getRemotable<T>(ctor: instantiation.INewConstructorSignature0<T>): T {
getRemotable<T>(ctor: instantiation.IConstructorSignature0<T>): T {
let id = Remotable.getId(ctor);
if (!id) {
throw new Error('Unknown Remotable: <<' + id + '>>');
......
......@@ -24,10 +24,10 @@ export interface IThreadService {
OneWorker(obj: IThreadSynchronizableObject, methodName: string, target: Function, param: any[], affinity: ThreadAffinity): TPromise<any>;
AllWorkers(obj: IThreadSynchronizableObject, methodName: string, target: Function, param: any[]): TPromise<any>;
createInstance<T extends IThreadSynchronizableObject>(ctor: instantiation.INewConstructorSignature0<T>): T;
createInstance<A1, T extends IThreadSynchronizableObject>(ctor: instantiation.INewConstructorSignature1<A1, T>, a1: A1): T;
createInstance<A1, A2, T extends IThreadSynchronizableObject>(ctor: instantiation.INewConstructorSignature2<A1, A2, T>, a1: A1, a2: A2): T;
createInstance<A1, A2, A3, T extends IThreadSynchronizableObject>(ctor: instantiation.INewConstructorSignature3<A1, A2, A3, T>, a1: A1, a2: A2, a3: A3): T;
createInstance<T extends IThreadSynchronizableObject>(ctor: instantiation.IConstructorSignature0<T>): T;
createInstance<A1, T extends IThreadSynchronizableObject>(ctor: instantiation.IConstructorSignature1<A1, T>, a1: A1): T;
createInstance<A1, A2, T extends IThreadSynchronizableObject>(ctor: instantiation.IConstructorSignature2<A1, A2, T>, a1: A1, a2: A2): T;
createInstance<A1, A2, A3, T extends IThreadSynchronizableObject>(ctor: instantiation.IConstructorSignature3<A1, A2, A3, T>, a1: A1, a2: A2, a3: A3): T;
createInstance<T extends IThreadSynchronizableObject>(descriptor: descriptors.AsyncDescriptor0<T>): T;
createInstance<A1, T extends IThreadSynchronizableObject>(descriptor: descriptors.AsyncDescriptor1<A1, T>, a1: A1): T;
......@@ -36,7 +36,7 @@ export interface IThreadService {
// --- END deprecated methods
getRemotable<T>(ctor: instantiation.INewConstructorSignature0<T>): T;
getRemotable<T>(ctor: instantiation.IConstructorSignature0<T>): T;
registerRemotableInstance(ctor: any, instance: any): void;
}
......
......@@ -12,7 +12,7 @@ import {Action, IAction} from 'vs/base/common/actions';
import {BaseActionItem, Separator} from 'vs/base/browser/ui/actionbar/actionbar';
import {IActionProvider} from 'vs/base/parts/tree/browser/actionsRenderer';
import {ITree} from 'vs/base/parts/tree/browser/tree';
import {IInstantiationService, INewConstructorSignature0} from 'vs/platform/instantiation/common/instantiation';
import {IInstantiationService, IConstructorSignature0} from 'vs/platform/instantiation/common/instantiation';
/**
* The action bar contributor allows to add actions to an actionbar in a given context.
......@@ -270,7 +270,7 @@ export interface IActionBarRegistry {
* Registers an Actionbar contributor. It will be called to contribute actions to all the action bars
* that are used in the Monaco Workbench in the given scope.
*/
registerActionBarContributor(scope: string, ctor: INewConstructorSignature0<ActionBarContributor>): void;
registerActionBarContributor(scope: string, ctor: IConstructorSignature0<ActionBarContributor>): void;
/**
* Returns an array of registered action bar contributors known to the workbench for the given scope.
......@@ -281,7 +281,7 @@ export interface IActionBarRegistry {
}
class ActionBarRegistry implements IActionBarRegistry {
private actionBarContributorConstructors: { scope: string; ctor: INewConstructorSignature0<ActionBarContributor>; }[] = [];
private actionBarContributorConstructors: { scope: string; ctor: IConstructorSignature0<ActionBarContributor>; }[] = [];
private actionBarContributorInstances: { [scope: string]: ActionBarContributor[] } = {};
private instantiationService: IInstantiationService;
......@@ -294,7 +294,7 @@ class ActionBarRegistry implements IActionBarRegistry {
}
}
private createActionBarContributor(scope: string, ctor: INewConstructorSignature0<ActionBarContributor>): void {
private createActionBarContributor(scope: string, ctor: IConstructorSignature0<ActionBarContributor>): void {
let instance = this.instantiationService.createInstance(ctor);
let target = <ActionBarContributor[]> collections.lookupOrInsert(this.actionBarContributorInstances, scope, []);
target.push(instance);
......@@ -347,7 +347,7 @@ class ActionBarRegistry implements IActionBarRegistry {
return null;
}
public registerActionBarContributor(scope: string, ctor: INewConstructorSignature0<ActionBarContributor>): void {
public registerActionBarContributor(scope: string, ctor: IConstructorSignature0<ActionBarContributor>): void {
if (!this.instantiationService) {
this.actionBarContributorConstructors.push({
scope: scope,
......
......@@ -14,7 +14,7 @@ import {Registry} from 'vs/platform/platform';
import {Panel} from 'vs/workbench/browser/panel';
import {EditorInput, IFileEditorInput, EditorOptions} from 'vs/workbench/common/editor';
import {IEditor, Position, POSITIONS} from 'vs/platform/editor/common/editor';
import {IInstantiationService, INewConstructorSignature0} from 'vs/platform/instantiation/common/instantiation';
import {IInstantiationService, IConstructorSignature0} from 'vs/platform/instantiation/common/instantiation';
import {SyncDescriptor, AsyncDescriptor} from 'vs/platform/instantiation/common/descriptors';
import {ITelemetryService} from 'vs/platform/telemetry/common/telemetry';
......@@ -225,7 +225,7 @@ export interface IEditorRegistry {
* @param editorInputId the identifier of the editor input
* @param factory the editor input factory for serialization/deserialization
*/
registerEditorInputFactory(editorInputId: string, ctor: INewConstructorSignature0<IEditorInputFactory>): void;
registerEditorInputFactory(editorInputId: string, ctor: IConstructorSignature0<IEditorInputFactory>): void;
/**
* Returns the editor input factory for the given editor input.
......@@ -258,7 +258,7 @@ class EditorRegistry implements IEditorRegistry {
private editors: EditorDescriptor[];
private instantiationService: IInstantiationService;
private defaultFileInputDescriptor: AsyncDescriptor<IFileEditorInput>;
private editorInputFactoryConstructors: { [editorInputId: string]: INewConstructorSignature0<IEditorInputFactory> } = Object.create(null);
private editorInputFactoryConstructors: { [editorInputId: string]: IConstructorSignature0<IEditorInputFactory> } = Object.create(null);
private editorInputFactoryInstances: { [editorInputId: string]: IEditorInputFactory } = Object.create(null);
constructor() {
......@@ -276,7 +276,7 @@ class EditorRegistry implements IEditorRegistry {
this.editorInputFactoryConstructors = {};
}
private createEditorInputFactory(editorInputId: string, ctor: INewConstructorSignature0<IEditorInputFactory>): void {
private createEditorInputFactory(editorInputId: string, ctor: IConstructorSignature0<IEditorInputFactory>): void {
let instance = this.instantiationService.createInstance(ctor);
this.editorInputFactoryInstances[editorInputId] = instance;
}
......@@ -388,7 +388,7 @@ class EditorRegistry implements IEditorRegistry {
return this.defaultFileInputDescriptor;
}
public registerEditorInputFactory(editorInputId: string, ctor: INewConstructorSignature0<IEditorInputFactory>): void {
public registerEditorInputFactory(editorInputId: string, ctor: IConstructorSignature0<IEditorInputFactory>): void {
if (!this.instantiationService) {
this.editorInputFactoryConstructors[editorInputId] = ctor;
} else {
......
......@@ -10,7 +10,7 @@ import {IDisposable} from 'vs/base/common/lifecycle';
import statusbarService = require('vs/workbench/services/statusbar/common/statusbarService');
/* tslint:enable:no-unused-variable */
import {SyncDescriptor0, createSyncDescriptor} from 'vs/platform/instantiation/common/descriptors';
import {INewConstructorSignature0} from 'vs/platform/instantiation/common/instantiation';
import {IConstructorSignature0} from 'vs/platform/instantiation/common/instantiation';
export interface IStatusbarItem {
render(element: HTMLElement): IDisposable;
......@@ -24,7 +24,7 @@ export class StatusbarItemDescriptor {
public alignment: StatusbarAlignment;
public priority: number;
constructor(ctor: INewConstructorSignature0<IStatusbarItem>, alignment?: StatusbarAlignment, priority?: number) {
constructor(ctor: IConstructorSignature0<IStatusbarItem>, alignment?: StatusbarAlignment, priority?: number) {
this.syncDescriptor = createSyncDescriptor(ctor);
this.alignment = alignment || StatusbarAlignment.LEFT;
this.priority = priority || 0;
......
......@@ -5,7 +5,7 @@
'use strict';
import {Registry, BaseRegistry} from 'vs/platform/platform';
import {IInstantiationService, INewConstructorSignature0} from 'vs/platform/instantiation/common/instantiation';
import {IInstantiationService, IConstructorSignature0} from 'vs/platform/instantiation/common/instantiation';
// --- Workbench Contribution Registry
......@@ -24,7 +24,7 @@ export namespace Extensions {
export const Workbench = 'workbench.contributions.kind';
}
export type IWorkbenchContributionSignature = INewConstructorSignature0<IWorkbenchContribution>;
export type IWorkbenchContributionSignature = IConstructorSignature0<IWorkbenchContribution>;
export interface IWorkbenchContributionsRegistry {
......
......@@ -43,7 +43,7 @@ import {IPartService} from 'vs/workbench/services/part/common/partService';
import {IStorageService} from 'vs/platform/storage/common/storage';
import {IResourceInput, Position, IEditor} from 'vs/platform/editor/common/editor';
import {IEventService} from 'vs/platform/event/common/event';
import {IInstantiationService, INewConstructorSignature2, INullService} from 'vs/platform/instantiation/common/instantiation';
import {IInstantiationService, IConstructorSignature2, INullService} from 'vs/platform/instantiation/common/instantiation';
import {IMessageService, IMessageWithAction, IConfirmation, Severity, CancelAction} from 'vs/platform/message/common/message';
import {IProgressService, IProgressRunner} from 'vs/platform/progress/common/progress';
import {IWorkspaceContextService} from 'vs/platform/workspace/common/workspace';
......@@ -546,7 +546,7 @@ export abstract class BaseGlobalNewAction extends Action {
});
}
protected abstract getAction(): INewConstructorSignature2<ITree, IFileStat, Action>;
protected abstract getAction(): IConstructorSignature2<ITree, IFileStat, Action>;
public dispose(): void {
super.dispose();
......@@ -589,7 +589,7 @@ export class GlobalNewFolderAction extends BaseGlobalNewAction {
public static ID = 'workbench.action.files.newFolder';
public static LABEL = nls.localize('newFolder', "New Folder");
protected getAction(): INewConstructorSignature2<ITree, IFileStat, Action> {
protected getAction(): IConstructorSignature2<ITree, IFileStat, Action> {
return NewFolderAction;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册