1- interface EvalHelper { }
1+ export interface EvalHelper { }
22interface ActiveEvalEmitter {
33 removeAllListeners ( event ?: string ) : void ;
44 emit ( event : string , ...args : any [ ] ) : void ;
@@ -32,7 +32,7 @@ interface IStatusbarEntry {
3232 readonly showBeak ?: boolean ;
3333}
3434interface IStatusbarService {
35- addEntry ( entry : IStatusbarEntry , alignment : StatusbarAlignment , priority ?: number ) : IDisposable ;
35+ addEntry ( entry : IStatusbarEntry , alignment : ide . StatusbarAlignment , priority ?: number ) : IDisposable ;
3636 setStatusMessage ( message : string , autoDisposeAfter ?: number , delayBy ?: number ) : IDisposable ;
3737}
3838type NotificationMessage = string | Error ;
@@ -41,7 +41,7 @@ interface INotificationProperties {
4141 silent ?: boolean ;
4242}
4343interface INotification extends INotificationProperties {
44- severity : Severity ;
44+ severity : ide . Severity ;
4545 message : NotificationMessage ;
4646 source ?: string ;
4747 actions ?: INotificationActions ;
@@ -58,32 +58,80 @@ interface INotificationProgress {
5858 done ( ) : void ;
5959}
6060
61- export interface INotificationHandle {
61+ interface INotificationHandle {
6262 readonly onDidClose : Event < void > ;
6363 readonly progress : INotificationProgress ;
64- updateSeverity ( severity : Severity ) : void ;
64+ updateSeverity ( severity : ide . Severity ) : void ;
6565 updateMessage ( message : NotificationMessage ) : void ;
6666 updateActions ( actions ?: INotificationActions ) : void ;
6767 close ( ) : void ;
6868}
6969
70- export interface IPromptChoice {
70+ interface IPromptChoice {
7171 label : string ;
7272 isSecondary ?: boolean ;
7373 keepOpen ?: boolean ;
7474 run : ( ) => void ;
7575}
7676
77- export interface IPromptOptions extends INotificationProperties {
77+ interface IPromptOptions extends INotificationProperties {
7878 onCancel ?: ( ) => void ;
7979}
8080
81- export interface INotificationService {
81+ interface INotificationService {
8282 notify ( notification : INotification ) : INotificationHandle ;
8383 info ( message : NotificationMessage | NotificationMessage [ ] ) : void ;
8484 warn ( message : NotificationMessage | NotificationMessage [ ] ) : void ;
8585 error ( message : NotificationMessage | NotificationMessage [ ] ) : void ;
86- prompt ( severity : Severity , message : string , choices : IPromptChoice [ ] , options ?: IPromptOptions ) : INotificationHandle ;
86+ prompt ( severity : ide . Severity , message : string , choices : IPromptChoice [ ] , options ?: IPromptOptions ) : INotificationHandle ;
87+ }
88+
89+ interface IBaseCommandAction {
90+ id : string ;
91+ title : string ;
92+ category ?: string ;
93+ }
94+
95+ interface ICommandAction extends IBaseCommandAction {
96+ // iconLocation?: { dark: URI; light?: URI; };
97+ // precondition?: ContextKeyExpr;
98+ // toggled?: ContextKeyExpr;
99+ }
100+
101+ interface ISerializableCommandAction extends IBaseCommandAction {
102+ // iconLocation?: { dark: UriComponents; light?: UriComponents; };
103+ }
104+
105+ interface IMenuItem {
106+ command : ICommandAction ;
107+ alt ?: ICommandAction ;
108+ // when?: ContextKeyExpr;
109+ group ?: 'navigation' | string ;
110+ order ?: number ;
111+ }
112+
113+ interface IMenuRegistry {
114+ appendMenuItem ( menu : ide . MenuId , item : IMenuItem ) : IDisposable ;
115+ }
116+
117+ export interface ICommandHandler {
118+ ( accessor : any , ...args : any [ ] ) : void ;
119+ }
120+
121+ export interface ICommand {
122+ id : string ;
123+ handler : ICommandHandler ;
124+ description ?: ICommandHandlerDescription | null ;
125+ }
126+
127+ export interface ICommandHandlerDescription {
128+ description : string ;
129+ args : { name : string ; description ?: string ; } [ ] ;
130+ returns ?: string ;
131+ }
132+
133+ interface ICommandRegistry {
134+ registerCommand ( command : ICommand ) : IDisposable ;
87135}
88136
89137declare namespace ide {
@@ -108,6 +156,8 @@ declare namespace ide {
108156 export const workbench : {
109157 readonly statusbarService : IStatusbarService ;
110158 readonly notificationService : INotificationService ;
159+ readonly menuRegistry : IMenuRegistry ;
160+ readonly commandRegistry : ICommandRegistry ;
111161 } ;
112162
113163 export enum Severity {
@@ -121,6 +171,46 @@ declare namespace ide {
121171 LEFT = 0 ,
122172 RIGHT = 1 ,
123173 }
174+
175+ export enum MenuId {
176+ CommandPalette ,
177+ DebugBreakpointsContext ,
178+ DebugCallStackContext ,
179+ DebugConsoleContext ,
180+ DebugVariablesContext ,
181+ DebugWatchContext ,
182+ EditorContext ,
183+ EditorTitle ,
184+ EditorTitleContext ,
185+ EmptyEditorGroupContext ,
186+ ExplorerContext ,
187+ MenubarAppearanceMenu ,
188+ MenubarDebugMenu ,
189+ MenubarEditMenu ,
190+ MenubarFileMenu ,
191+ MenubarGoMenu ,
192+ MenubarHelpMenu ,
193+ MenubarLayoutMenu ,
194+ MenubarNewBreakpointMenu ,
195+ MenubarPreferencesMenu ,
196+ MenubarRecentMenu ,
197+ MenubarSelectionMenu ,
198+ MenubarSwitchEditorMenu ,
199+ MenubarSwitchGroupMenu ,
200+ MenubarTerminalMenu ,
201+ MenubarViewMenu ,
202+ OpenEditorsContext ,
203+ ProblemsPanelContext ,
204+ SCMChangeContext ,
205+ SCMResourceContext ,
206+ SCMResourceGroupContext ,
207+ SCMSourceControl ,
208+ SCMTitle ,
209+ SearchContext ,
210+ TouchBarContext ,
211+ ViewItemContext ,
212+ ViewTitle ,
213+ }
124214}
125215
126216declare global {
0 commit comments