@theia/plugin-ext 1.33.0-next.9 → 1.34.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/collections.d.ts +5 -0
- package/lib/common/collections.d.ts.map +1 -0
- package/lib/common/collections.js +40 -0
- package/lib/common/collections.js.map +1 -0
- package/lib/common/plugin-api-rpc-model.d.ts +80 -0
- package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc-model.js +17 -1
- package/lib/common/plugin-api-rpc-model.js.map +1 -1
- package/lib/common/plugin-api-rpc.d.ts +113 -1
- package/lib/common/plugin-api-rpc.d.ts.map +1 -1
- package/lib/common/plugin-api-rpc.js +5 -2
- package/lib/common/plugin-api-rpc.js.map +1 -1
- package/lib/common/reference-map.d.ts +8 -0
- package/lib/common/reference-map.d.ts.map +1 -0
- package/lib/common/reference-map.js +40 -0
- package/lib/common/reference-map.js.map +1 -0
- package/lib/common/types.d.ts +4 -0
- package/lib/common/types.d.ts.map +1 -1
- package/lib/common/types.js +11 -1
- package/lib/common/types.js.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.d.ts +1 -0
- package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
- package/lib/main/browser/comments/comment-thread-widget.js +11 -0
- package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
- package/lib/main/browser/custom-editors/custom-editors-main.js +2 -2
- package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
- package/lib/main/browser/file-system-main-impl.d.ts +1 -0
- package/lib/main/browser/file-system-main-impl.d.ts.map +1 -1
- package/lib/main/browser/file-system-main-impl.js +9 -2
- package/lib/main/browser/file-system-main-impl.js.map +1 -1
- package/lib/main/browser/languages-main.d.ts +1 -0
- package/lib/main/browser/languages-main.d.ts.map +1 -1
- package/lib/main/browser/languages-main.js +10 -0
- package/lib/main/browser/languages-main.js.map +1 -1
- package/lib/main/browser/tabs/tabs-main.d.ts +10 -0
- package/lib/main/browser/tabs/tabs-main.d.ts.map +1 -0
- package/lib/main/browser/tabs/tabs-main.js +33 -0
- package/lib/main/browser/tabs/tabs-main.js.map +1 -0
- package/lib/main/browser/terminal-main.d.ts +1 -1
- package/lib/main/browser/terminal-main.d.ts.map +1 -1
- package/lib/main/browser/terminal-main.js +2 -2
- package/lib/main/browser/terminal-main.js.map +1 -1
- package/lib/main/browser/webview/webview.d.ts +1 -0
- package/lib/main/browser/webview/webview.d.ts.map +1 -1
- package/lib/main/browser/webview/webview.js.map +1 -1
- package/lib/main/browser/webviews-main.d.ts.map +1 -1
- package/lib/main/browser/webviews-main.js +6 -6
- package/lib/main/browser/webviews-main.js.map +1 -1
- package/lib/plugin/comments.js +2 -0
- package/lib/plugin/comments.js.map +1 -1
- package/lib/plugin/file-system-ext-impl.d.ts +2 -0
- package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
- package/lib/plugin/file-system-ext-impl.js +22 -5
- package/lib/plugin/file-system-ext-impl.js.map +1 -1
- package/lib/plugin/languages/inline-completion.d.ts +21 -0
- package/lib/plugin/languages/inline-completion.d.ts.map +1 -0
- package/lib/plugin/languages/inline-completion.js +94 -0
- package/lib/plugin/languages/inline-completion.js.map +1 -0
- package/lib/plugin/languages.d.ts +5 -2
- package/lib/plugin/languages.d.ts.map +1 -1
- package/lib/plugin/languages.js +16 -1
- package/lib/plugin/languages.js.map +1 -1
- package/lib/plugin/plugin-context.d.ts.map +1 -1
- package/lib/plugin/plugin-context.js +120 -3
- package/lib/plugin/plugin-context.js.map +1 -1
- package/lib/plugin/tabs.d.ts +23 -0
- package/lib/plugin/tabs.d.ts.map +1 -0
- package/lib/plugin/tabs.js +362 -0
- package/lib/plugin/tabs.js.map +1 -0
- package/lib/plugin/theming.d.ts.map +1 -1
- package/lib/plugin/theming.js +3 -0
- package/lib/plugin/theming.js.map +1 -1
- package/lib/plugin/type-converters.d.ts +4 -0
- package/lib/plugin/type-converters.d.ts.map +1 -1
- package/lib/plugin/type-converters.js +21 -1
- package/lib/plugin/type-converters.js.map +1 -1
- package/lib/plugin/types-impl.d.ts +190 -1
- package/lib/plugin/types-impl.d.ts.map +1 -1
- package/lib/plugin/types-impl.js +265 -6
- package/lib/plugin/types-impl.js.map +1 -1
- package/package.json +26 -26
- package/src/common/collections.ts +37 -0
- package/src/common/plugin-api-rpc-model.ts +98 -0
- package/src/common/plugin-api-rpc.ts +142 -3
- package/src/common/reference-map.ts +38 -0
- package/src/common/types.ts +11 -0
- package/src/main/browser/comments/comment-thread-widget.tsx +11 -0
- package/src/main/browser/custom-editors/custom-editors-main.ts +2 -1
- package/src/main/browser/file-system-main-impl.ts +12 -3
- package/src/main/browser/languages-main.ts +18 -1
- package/src/main/browser/style/comments.css +6 -0
- package/src/main/browser/tabs/tabs-main.ts +42 -0
- package/src/main/browser/terminal-main.ts +2 -2
- package/src/main/browser/webview/pre/main.js +8 -1
- package/src/main/browser/webview/webview.ts +1 -0
- package/src/main/browser/webviews-main.ts +6 -3
- package/src/plugin/comments.ts +2 -0
- package/src/plugin/file-system-ext-impl.ts +21 -5
- package/src/plugin/languages/inline-completion.ts +126 -0
- package/src/plugin/languages.ts +30 -3
- package/src/plugin/plugin-context.ts +164 -5
- package/src/plugin/tabs.ts +430 -0
- package/src/plugin/theming.ts +3 -0
- package/src/plugin/type-converters.ts +22 -0
- package/src/plugin/types-impl.ts +287 -1
package/src/plugin/types-impl.ts
CHANGED
|
@@ -134,6 +134,8 @@ export class Disposable {
|
|
|
134
134
|
static create(func: () => void): Disposable {
|
|
135
135
|
return new Disposable(func);
|
|
136
136
|
}
|
|
137
|
+
|
|
138
|
+
static NULL: Disposable;
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
export interface AccessibilityInformation {
|
|
@@ -176,7 +178,8 @@ export enum ViewColumn {
|
|
|
176
178
|
export enum ColorThemeKind {
|
|
177
179
|
Light = 1,
|
|
178
180
|
Dark = 2,
|
|
179
|
-
HighContrast = 3
|
|
181
|
+
HighContrast = 3,
|
|
182
|
+
HighContrastLight = 4
|
|
180
183
|
}
|
|
181
184
|
|
|
182
185
|
export enum ExtensionMode {
|
|
@@ -978,6 +981,37 @@ export class CompletionList {
|
|
|
978
981
|
}
|
|
979
982
|
}
|
|
980
983
|
|
|
984
|
+
export enum InlineCompletionTriggerKind {
|
|
985
|
+
Invoke = 0,
|
|
986
|
+
Automatic = 1,
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
@es5ClassCompat
|
|
990
|
+
export class InlineCompletionItem implements theia.InlineCompletionItem {
|
|
991
|
+
|
|
992
|
+
filterText?: string;
|
|
993
|
+
insertText: string;
|
|
994
|
+
range?: Range;
|
|
995
|
+
command?: theia.Command;
|
|
996
|
+
|
|
997
|
+
constructor(insertText: string, range?: Range, command?: theia.Command) {
|
|
998
|
+
this.insertText = insertText;
|
|
999
|
+
this.range = range;
|
|
1000
|
+
this.command = command;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
@es5ClassCompat
|
|
1005
|
+
export class InlineCompletionList implements theia.InlineCompletionList {
|
|
1006
|
+
|
|
1007
|
+
items: theia.InlineCompletionItem[];
|
|
1008
|
+
commands: theia.Command[] | undefined = undefined;
|
|
1009
|
+
|
|
1010
|
+
constructor(items: theia.InlineCompletionItem[]) {
|
|
1011
|
+
this.items = items;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
|
|
981
1015
|
export enum DiagnosticSeverity {
|
|
982
1016
|
Error = 0,
|
|
983
1017
|
Warning = 1,
|
|
@@ -1065,6 +1099,218 @@ export enum MarkerTag {
|
|
|
1065
1099
|
Deprecated = 2,
|
|
1066
1100
|
}
|
|
1067
1101
|
|
|
1102
|
+
export enum NotebookCellKind {
|
|
1103
|
+
Markup = 1,
|
|
1104
|
+
Code = 2
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
export enum NotebookCellStatusBarAlignment {
|
|
1108
|
+
Left = 1,
|
|
1109
|
+
Right = 2
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
export enum NotebookControllerAffinity {
|
|
1113
|
+
Default = 1,
|
|
1114
|
+
Preferred = 2
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
export enum NotebookEditorRevealType {
|
|
1118
|
+
Default = 0,
|
|
1119
|
+
InCenter = 1,
|
|
1120
|
+
InCenterIfOutsideViewport = 2,
|
|
1121
|
+
AtTop = 3
|
|
1122
|
+
}
|
|
1123
|
+
@es5ClassCompat
|
|
1124
|
+
export class NotebookCellData implements theia.NotebookCellData {
|
|
1125
|
+
languageId: string;
|
|
1126
|
+
kind: NotebookCellKind;
|
|
1127
|
+
value: string;
|
|
1128
|
+
outputs?: theia.NotebookCellOutput[];
|
|
1129
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1130
|
+
metadata?: { [key: string]: any };
|
|
1131
|
+
executionSummary?: theia.NotebookCellExecutionSummary;
|
|
1132
|
+
|
|
1133
|
+
constructor(kind: NotebookCellKind, value: string, languageId: string) {
|
|
1134
|
+
this.kind = kind;
|
|
1135
|
+
this.value = value;
|
|
1136
|
+
this.languageId = languageId;
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
@es5ClassCompat
|
|
1141
|
+
export class NotebookCellOutput implements theia.NotebookCellOutput {
|
|
1142
|
+
items: theia.NotebookCellOutputItem[];
|
|
1143
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1144
|
+
metadata?: { [key: string]: any };
|
|
1145
|
+
|
|
1146
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1147
|
+
constructor(items: theia.NotebookCellOutputItem[], metadata?: { [key: string]: any }) {
|
|
1148
|
+
this.items = items;
|
|
1149
|
+
this.metadata = metadata;
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
export class NotebookCellOutputItem implements theia.NotebookCellOutputItem {
|
|
1154
|
+
mime: string;
|
|
1155
|
+
data: Uint8Array;
|
|
1156
|
+
|
|
1157
|
+
static #encoder = new TextEncoder();
|
|
1158
|
+
|
|
1159
|
+
static text(value: string, mime?: string): NotebookCellOutputItem {
|
|
1160
|
+
const bytes = NotebookCellOutputItem.#encoder.encode(String(value));
|
|
1161
|
+
return new NotebookCellOutputItem(bytes, mime || 'text/plain');
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1165
|
+
static json(value: any, mime?: string): NotebookCellOutputItem {
|
|
1166
|
+
const jsonStr = JSON.stringify(value, undefined, '\t');
|
|
1167
|
+
return NotebookCellOutputItem.text(jsonStr, mime);
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
static stdout(value: string): NotebookCellOutputItem {
|
|
1171
|
+
return NotebookCellOutputItem.text(value, 'application/vnd.code.notebook.stdout');
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
static stderr(value: string): NotebookCellOutputItem {
|
|
1175
|
+
return NotebookCellOutputItem.text(value, 'application/vnd.code.notebook.stderr');
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
static error(value: Error): NotebookCellOutputItem {
|
|
1179
|
+
return NotebookCellOutputItem.json(value, 'application/vnd.code.notebook.error');
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
constructor(data: Uint8Array, mime: string) {
|
|
1183
|
+
this.data = data;
|
|
1184
|
+
this.mime = mime;
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
@es5ClassCompat
|
|
1189
|
+
export class NotebookCellStatusBarItem implements theia.NotebookCellStatusBarItem {
|
|
1190
|
+
text: string;
|
|
1191
|
+
alignment: NotebookCellStatusBarAlignment;
|
|
1192
|
+
command?: string | theia.Command;
|
|
1193
|
+
tooltip?: string;
|
|
1194
|
+
priority?: number;
|
|
1195
|
+
accessibilityInformation?: AccessibilityInformation;
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* Creates a new NotebookCellStatusBarItem.
|
|
1199
|
+
* @param text The text to show for the item.
|
|
1200
|
+
* @param alignment Whether the item is aligned to the left or right.
|
|
1201
|
+
* @stubbed
|
|
1202
|
+
*/
|
|
1203
|
+
constructor(text: string, alignment: NotebookCellStatusBarAlignment) {
|
|
1204
|
+
this.text = text;
|
|
1205
|
+
this.alignment = alignment;
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
@es5ClassCompat
|
|
1210
|
+
export class NotebookData implements theia.NotebookData {
|
|
1211
|
+
cells: NotebookCellData[];
|
|
1212
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1213
|
+
metadata?: { [key: string]: any };
|
|
1214
|
+
|
|
1215
|
+
constructor(cells: NotebookCellData[]) {
|
|
1216
|
+
this.cells = cells;
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
export class NotebookDocument implements theia.NotebookDocument {
|
|
1221
|
+
readonly uri: theia.Uri;
|
|
1222
|
+
readonly notebookType: string;
|
|
1223
|
+
readonly version: number;
|
|
1224
|
+
readonly isDirty: boolean;
|
|
1225
|
+
readonly isUntitled: boolean;
|
|
1226
|
+
readonly isClosed: boolean;
|
|
1227
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1228
|
+
readonly metadata: { [key: string]: any };
|
|
1229
|
+
readonly cellCount: number;
|
|
1230
|
+
|
|
1231
|
+
cellAt(index: number): theia.NotebookCell {
|
|
1232
|
+
return {} as theia.NotebookCell;
|
|
1233
|
+
}
|
|
1234
|
+
save(): theia.Thenable<boolean> {
|
|
1235
|
+
return Promise.resolve(false);
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
getCells(range?: theia.NotebookRange | undefined): theia.NotebookCell[] {
|
|
1239
|
+
return [] as NotebookCell[];
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
export class NotebookCell implements theia.NotebookCell {
|
|
1243
|
+
readonly index: number;
|
|
1244
|
+
readonly notebook: theia.NotebookDocument;
|
|
1245
|
+
readonly kind: theia.NotebookCellKind;
|
|
1246
|
+
readonly document: theia.TextDocument;
|
|
1247
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1248
|
+
readonly metadata: { readonly [key: string]: any; };
|
|
1249
|
+
readonly outputs: readonly theia.NotebookCellOutput[];
|
|
1250
|
+
readonly executionSummary: theia.NotebookCellExecutionSummary | undefined;
|
|
1251
|
+
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
export class NotebookRange implements theia.NotebookRange {
|
|
1255
|
+
readonly start: number;
|
|
1256
|
+
readonly end: number;
|
|
1257
|
+
readonly isEmpty: boolean;
|
|
1258
|
+
|
|
1259
|
+
with(change: { start?: number; end?: number }): NotebookRange {
|
|
1260
|
+
let newStart = this.start;
|
|
1261
|
+
let newEnd = this.end;
|
|
1262
|
+
|
|
1263
|
+
if (change.start !== undefined) {
|
|
1264
|
+
newStart = change.start;
|
|
1265
|
+
}
|
|
1266
|
+
if (change.end !== undefined) {
|
|
1267
|
+
newEnd = change.end;
|
|
1268
|
+
}
|
|
1269
|
+
if (newStart === this.start && newEnd === this.end) {
|
|
1270
|
+
return this;
|
|
1271
|
+
}
|
|
1272
|
+
return new NotebookRange(newStart, newEnd);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
constructor(start: number, end: number) {
|
|
1276
|
+
this.start = start;
|
|
1277
|
+
this.end = end;
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
@es5ClassCompat
|
|
1283
|
+
export class NotebookEdit implements theia.NotebookEdit {
|
|
1284
|
+
range: theia.NotebookRange;
|
|
1285
|
+
newCells: theia.NotebookCellData[];
|
|
1286
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1287
|
+
newCellMetadata?: { [key: string]: any; } | undefined;
|
|
1288
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1289
|
+
newNotebookMetadata?: { [key: string]: any; } | undefined;
|
|
1290
|
+
|
|
1291
|
+
static replaceCells(range: NotebookRange, newCells: NotebookCellData[]): NotebookEdit {
|
|
1292
|
+
return new NotebookEdit();
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
static insertCells(index: number, newCells: NotebookCellData[]): NotebookEdit {
|
|
1296
|
+
return new NotebookEdit();
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
static deleteCells(range: NotebookRange): NotebookEdit {
|
|
1300
|
+
return new NotebookEdit();
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1304
|
+
static updateCellMetadata(index: number, newCellMetadata: { [key: string]: any }): NotebookEdit {
|
|
1305
|
+
return new NotebookEdit();
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1309
|
+
static updateNotebookMetadata(newNotebookMetadata: { [key: string]: any }): NotebookEdit {
|
|
1310
|
+
return new NotebookEdit();
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1068
1314
|
@es5ClassCompat
|
|
1069
1315
|
export class ParameterInformation {
|
|
1070
1316
|
label: string | [number, number];
|
|
@@ -1309,6 +1555,7 @@ export class CodeActionKind {
|
|
|
1309
1555
|
public static readonly Refactor = CodeActionKind.Empty.append('refactor');
|
|
1310
1556
|
public static readonly RefactorExtract = CodeActionKind.Refactor.append('extract');
|
|
1311
1557
|
public static readonly RefactorInline = CodeActionKind.Refactor.append('inline');
|
|
1558
|
+
public static readonly RefactorMove = CodeActionKind.Refactor.append('move');
|
|
1312
1559
|
public static readonly RefactorRewrite = CodeActionKind.Refactor.append('rewrite');
|
|
1313
1560
|
public static readonly Source = CodeActionKind.Empty.append('source');
|
|
1314
1561
|
public static readonly SourceOrganizeImports = CodeActionKind.Source.append('organizeImports');
|
|
@@ -2994,3 +3241,42 @@ export enum InputBoxValidationSeverity {
|
|
|
2994
3241
|
}
|
|
2995
3242
|
|
|
2996
3243
|
// #endregion
|
|
3244
|
+
|
|
3245
|
+
// #region Tab Inputs
|
|
3246
|
+
|
|
3247
|
+
export class TextTabInput {
|
|
3248
|
+
constructor(readonly uri: URI) { }
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3251
|
+
export class TextDiffTabInput {
|
|
3252
|
+
constructor(readonly original: URI, readonly modified: URI) { }
|
|
3253
|
+
}
|
|
3254
|
+
|
|
3255
|
+
export class TextMergeTabInput {
|
|
3256
|
+
constructor(readonly base: URI, readonly input1: URI, readonly input2: URI, readonly result: URI) { }
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
export class CustomEditorTabInput {
|
|
3260
|
+
constructor(readonly uri: URI, readonly viewType: string) { }
|
|
3261
|
+
}
|
|
3262
|
+
|
|
3263
|
+
export class WebviewEditorTabInput {
|
|
3264
|
+
constructor(readonly viewType: string) { }
|
|
3265
|
+
}
|
|
3266
|
+
|
|
3267
|
+
export class NotebookEditorTabInput {
|
|
3268
|
+
constructor(readonly uri: URI, readonly notebookType: string) { }
|
|
3269
|
+
}
|
|
3270
|
+
|
|
3271
|
+
export class NotebookDiffEditorTabInput {
|
|
3272
|
+
constructor(readonly original: URI, readonly modified: URI, readonly notebookType: string) { }
|
|
3273
|
+
}
|
|
3274
|
+
|
|
3275
|
+
export class TerminalEditorTabInput {
|
|
3276
|
+
constructor() { }
|
|
3277
|
+
}
|
|
3278
|
+
export class InteractiveWindowInput {
|
|
3279
|
+
constructor(readonly uri: URI, readonly inputBoxUri: URI) { }
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
// #endregion
|