1
- interface EvalHelper { }
1
+ export interface EvalHelper { }
2
2
interface ActiveEvalEmitter {
3
3
removeAllListeners ( event ?: string ) : void ;
4
4
emit ( event : string , ...args : any [ ] ) : void ;
@@ -32,7 +32,7 @@ interface IStatusbarEntry {
32
32
readonly showBeak ?: boolean ;
33
33
}
34
34
interface IStatusbarService {
35
- addEntry ( entry : IStatusbarEntry , alignment : StatusbarAlignment , priority ?: number ) : IDisposable ;
35
+ addEntry ( entry : IStatusbarEntry , alignment : ide . StatusbarAlignment , priority ?: number ) : IDisposable ;
36
36
setStatusMessage ( message : string , autoDisposeAfter ?: number , delayBy ?: number ) : IDisposable ;
37
37
}
38
38
type NotificationMessage = string | Error ;
@@ -41,7 +41,7 @@ interface INotificationProperties {
41
41
silent ?: boolean ;
42
42
}
43
43
interface INotification extends INotificationProperties {
44
- severity : Severity ;
44
+ severity : ide . Severity ;
45
45
message : NotificationMessage ;
46
46
source ?: string ;
47
47
actions ?: INotificationActions ;
@@ -58,32 +58,80 @@ interface INotificationProgress {
58
58
done ( ) : void ;
59
59
}
60
60
61
- export interface INotificationHandle {
61
+ interface INotificationHandle {
62
62
readonly onDidClose : Event < void > ;
63
63
readonly progress : INotificationProgress ;
64
- updateSeverity ( severity : Severity ) : void ;
64
+ updateSeverity ( severity : ide . Severity ) : void ;
65
65
updateMessage ( message : NotificationMessage ) : void ;
66
66
updateActions ( actions ?: INotificationActions ) : void ;
67
67
close ( ) : void ;
68
68
}
69
69
70
- export interface IPromptChoice {
70
+ interface IPromptChoice {
71
71
label : string ;
72
72
isSecondary ?: boolean ;
73
73
keepOpen ?: boolean ;
74
74
run : ( ) => void ;
75
75
}
76
76
77
- export interface IPromptOptions extends INotificationProperties {
77
+ interface IPromptOptions extends INotificationProperties {
78
78
onCancel ?: ( ) => void ;
79
79
}
80
80
81
- export interface INotificationService {
81
+ interface INotificationService {
82
82
notify ( notification : INotification ) : INotificationHandle ;
83
83
info ( message : NotificationMessage | NotificationMessage [ ] ) : void ;
84
84
warn ( message : NotificationMessage | NotificationMessage [ ] ) : void ;
85
85
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 ;
87
135
}
88
136
89
137
declare namespace ide {
@@ -108,6 +156,8 @@ declare namespace ide {
108
156
export const workbench : {
109
157
readonly statusbarService : IStatusbarService ;
110
158
readonly notificationService : INotificationService ;
159
+ readonly menuRegistry : IMenuRegistry ;
160
+ readonly commandRegistry : ICommandRegistry ;
111
161
} ;
112
162
113
163
export enum Severity {
@@ -121,6 +171,46 @@ declare namespace ide {
121
171
LEFT = 0 ,
122
172
RIGHT = 1 ,
123
173
}
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
+ }
124
214
}
125
215
126
216
declare global {
0 commit comments