@theia/plugin 1.29.0-next.9 → 1.30.0-next.1
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/package.json +3 -3
- package/src/theia-proposed.d.ts +47 -124
- package/src/theia.d.ts +584 -589
package/src/theia.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export module '@theia/plugin' {
|
|
|
67
67
|
/**
|
|
68
68
|
* Represents an plugin.
|
|
69
69
|
*
|
|
70
|
-
* To get an instance of an `Plugin` use
|
|
70
|
+
* To get an instance of an `Plugin` use {@link plugins.getPlugin getPlugin}.
|
|
71
71
|
*/
|
|
72
72
|
export interface Plugin<T> {
|
|
73
73
|
|
|
@@ -195,22 +195,30 @@ export module '@theia/plugin' {
|
|
|
195
195
|
*/
|
|
196
196
|
iconClass?: string;
|
|
197
197
|
}
|
|
198
|
+
|
|
198
199
|
/**
|
|
199
|
-
*
|
|
200
|
+
* Represents a reference to a command. Provides a title which
|
|
201
|
+
* will be used to represent a command in the UI and, optionally,
|
|
202
|
+
* an array of arguments which will be passed to the command handler
|
|
203
|
+
* function when invoked.
|
|
200
204
|
*/
|
|
201
205
|
export interface Command {
|
|
202
206
|
/**
|
|
203
|
-
*
|
|
207
|
+
* Title of the command, like `save`.
|
|
204
208
|
*/
|
|
205
|
-
|
|
209
|
+
title: string;
|
|
210
|
+
|
|
206
211
|
/**
|
|
207
|
-
*
|
|
212
|
+
* The identifier of the actual command handler.
|
|
213
|
+
* @see {@link commands.registerCommand}
|
|
208
214
|
*/
|
|
209
|
-
|
|
215
|
+
command: string;
|
|
216
|
+
|
|
210
217
|
/**
|
|
211
|
-
* A tooltip for
|
|
218
|
+
* A tooltip for the command, when represented in the UI.
|
|
212
219
|
*/
|
|
213
220
|
tooltip?: string;
|
|
221
|
+
|
|
214
222
|
/**
|
|
215
223
|
* Arguments that the command handler should be
|
|
216
224
|
* invoked with.
|
|
@@ -312,8 +320,8 @@ export module '@theia/plugin' {
|
|
|
312
320
|
/**
|
|
313
321
|
* Create a new position derived from this position.
|
|
314
322
|
*
|
|
315
|
-
* @param line Value that should be used as line value, default is the
|
|
316
|
-
* @param character Value that should be used as character value, default is the
|
|
323
|
+
* @param line Value that should be used as line value, default is the {@link Position.line existing value}
|
|
324
|
+
* @param character Value that should be used as character value, default is the {@link Position.character existing value}
|
|
317
325
|
* @return A position where line and character are replaced by the given values.
|
|
318
326
|
*/
|
|
319
327
|
with(line?: number, character?: number): Position;
|
|
@@ -539,64 +547,72 @@ export module '@theia/plugin' {
|
|
|
539
547
|
}
|
|
540
548
|
|
|
541
549
|
/**
|
|
542
|
-
* Represents an event describing the change in text editor selections.
|
|
550
|
+
* Represents an event describing the change in a {@link TextEditor.selections text editor's selections}.
|
|
543
551
|
*/
|
|
544
552
|
export interface TextEditorSelectionChangeEvent {
|
|
545
553
|
/**
|
|
546
|
-
* The text editor for which the selections have changed.
|
|
554
|
+
* The {@link TextEditor text editor} for which the selections have changed.
|
|
547
555
|
*/
|
|
548
|
-
textEditor: TextEditor;
|
|
556
|
+
readonly textEditor: TextEditor;
|
|
549
557
|
/**
|
|
550
|
-
* The new text editor selections
|
|
558
|
+
* The new value for the {@link TextEditor.selections text editor's selections}.
|
|
551
559
|
*/
|
|
552
|
-
selections: Selection[];
|
|
553
|
-
|
|
554
|
-
|
|
560
|
+
readonly selections: readonly Selection[];
|
|
561
|
+
/**
|
|
562
|
+
* The {@link TextEditorSelectionChangeKind change kind} which has triggered this
|
|
563
|
+
* event. Can be `undefined`.
|
|
564
|
+
*/
|
|
565
|
+
readonly kind: TextEditorSelectionChangeKind | undefined;
|
|
555
566
|
}
|
|
556
567
|
|
|
557
568
|
/**
|
|
558
|
-
* Represents an event the change in a text editor's options
|
|
569
|
+
* Represents an event describing the change in a {@link TextEditor.options text editor's options}.
|
|
559
570
|
*/
|
|
560
571
|
export interface TextEditorOptionsChangeEvent {
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
572
|
+
/**
|
|
573
|
+
* The {@link TextEditor text editor} for which the options have changed.
|
|
574
|
+
*/
|
|
575
|
+
readonly textEditor: TextEditor;
|
|
576
|
+
/**
|
|
577
|
+
* The new value for the {@link TextEditor.options text editor's options}.
|
|
578
|
+
*/
|
|
579
|
+
readonly options: TextEditorOptions;
|
|
564
580
|
}
|
|
565
581
|
|
|
566
582
|
/**
|
|
567
|
-
* Represents an event the change in a text editor's visible ranges
|
|
583
|
+
* Represents an event describing the change in a {@link TextEditor.visibleRanges text editor's visible ranges}.
|
|
568
584
|
*/
|
|
569
585
|
export interface TextEditorVisibleRangesChangeEvent {
|
|
570
586
|
/**
|
|
571
|
-
* The text editor for which the visible ranges have
|
|
587
|
+
* The {@link TextEditor text editor} for which the visible ranges have changed.
|
|
572
588
|
*/
|
|
573
|
-
textEditor: TextEditor;
|
|
589
|
+
readonly textEditor: TextEditor;
|
|
574
590
|
/**
|
|
575
|
-
* The new text editor visible ranges.
|
|
591
|
+
* The new value for the {@link TextEditor.visibleRanges text editor's visible ranges}.
|
|
576
592
|
*/
|
|
577
|
-
visibleRanges: Range[];
|
|
593
|
+
readonly visibleRanges: readonly Range[];
|
|
578
594
|
}
|
|
579
595
|
|
|
580
596
|
/**
|
|
581
|
-
* Represents an event describing the change of a text editor's view column.
|
|
597
|
+
* Represents an event describing the change of a {@link TextEditor.viewColumn text editor's view column}.
|
|
582
598
|
*/
|
|
583
599
|
export interface TextEditorViewColumnChangeEvent {
|
|
584
600
|
/**
|
|
585
|
-
* The text editor for which the
|
|
601
|
+
* The {@link TextEditor text editor} for which the view column has changed.
|
|
586
602
|
*/
|
|
587
|
-
textEditor: TextEditor;
|
|
603
|
+
readonly textEditor: TextEditor;
|
|
588
604
|
/**
|
|
589
|
-
* The new value for the text editor's view column.
|
|
605
|
+
* The new value for the {@link TextEditor.viewColumn text editor's view column}.
|
|
590
606
|
*/
|
|
591
|
-
viewColumn: ViewColumn;
|
|
607
|
+
readonly viewColumn: ViewColumn;
|
|
592
608
|
}
|
|
593
609
|
|
|
594
610
|
/**
|
|
595
611
|
* Represents a handle to a set of decorations
|
|
596
|
-
* sharing the same
|
|
612
|
+
* sharing the same {@link DecorationRenderOptions styling options} in a {@link TextEditor text editor}.
|
|
597
613
|
*
|
|
598
614
|
* To get an instance of a `TextEditorDecorationType` use
|
|
599
|
-
*
|
|
615
|
+
* {@link window.createTextEditorDecorationType createTextEditorDecorationType}.
|
|
600
616
|
*/
|
|
601
617
|
export interface TextEditorDecorationType {
|
|
602
618
|
|
|
@@ -614,7 +630,7 @@ export module '@theia/plugin' {
|
|
|
614
630
|
/**
|
|
615
631
|
* Information about where a symbol is defined.
|
|
616
632
|
*
|
|
617
|
-
* Provides additional metadata over normal
|
|
633
|
+
* Provides additional metadata over normal {@link Location location} definitions, including the range of
|
|
618
634
|
* the defining symbol
|
|
619
635
|
*/
|
|
620
636
|
export interface LocationLink {
|
|
@@ -647,7 +663,7 @@ export module '@theia/plugin' {
|
|
|
647
663
|
}
|
|
648
664
|
|
|
649
665
|
/**
|
|
650
|
-
* The definition of a symbol represented as one or many
|
|
666
|
+
* The definition of a symbol represented as one or many {@link Location locations}.
|
|
651
667
|
* For most programming languages there is only one location at which a symbol is
|
|
652
668
|
* defined.
|
|
653
669
|
*/
|
|
@@ -803,7 +819,7 @@ export module '@theia/plugin' {
|
|
|
803
819
|
/**
|
|
804
820
|
* Appends the given string as codeblock using the provided language.
|
|
805
821
|
* @param value A code snippet.
|
|
806
|
-
* @param language An optional
|
|
822
|
+
* @param language An optional {@link languages.getLanguages language identifier}.
|
|
807
823
|
*/
|
|
808
824
|
appendCodeblock(value: string, language?: string): MarkdownString;
|
|
809
825
|
}
|
|
@@ -815,7 +831,7 @@ export module '@theia/plugin' {
|
|
|
815
831
|
*
|
|
816
832
|
* @deprecated This type is deprecated, please use [`MarkdownString`](#MarkdownString) instead.
|
|
817
833
|
*/
|
|
818
|
-
export type MarkedString =
|
|
834
|
+
export type MarkedString = string | { language: string; value: string }; // keep for compatibility reason
|
|
819
835
|
|
|
820
836
|
export interface ThemableDecorationAttachmentRenderOptions {
|
|
821
837
|
/**
|
|
@@ -894,7 +910,7 @@ export module '@theia/plugin' {
|
|
|
894
910
|
}
|
|
895
911
|
|
|
896
912
|
/**
|
|
897
|
-
* Represents options for a specific decoration in a
|
|
913
|
+
* Represents options for a specific decoration in a {@link TextEditorDecorationType decoration set}.
|
|
898
914
|
*/
|
|
899
915
|
export interface DecorationOptions {
|
|
900
916
|
|
|
@@ -906,7 +922,7 @@ export module '@theia/plugin' {
|
|
|
906
922
|
/**
|
|
907
923
|
* A message that should be rendered when hovering over the decoration.
|
|
908
924
|
*/
|
|
909
|
-
hoverMessage?: MarkedString | MarkedString
|
|
925
|
+
hoverMessage?: MarkdownString | MarkedString | Array<MarkdownString | MarkedString>;
|
|
910
926
|
|
|
911
927
|
/**
|
|
912
928
|
* Render options applied to the current decoration. For performance reasons, keep the
|
|
@@ -916,12 +932,12 @@ export module '@theia/plugin' {
|
|
|
916
932
|
}
|
|
917
933
|
|
|
918
934
|
/**
|
|
919
|
-
* Represents theme specific rendering styles for a
|
|
935
|
+
* Represents theme specific rendering styles for a {@link TextEditorDecorationType text editor decoration}.
|
|
920
936
|
*/
|
|
921
937
|
export interface ThemableDecorationRenderOptions {
|
|
922
938
|
/**
|
|
923
939
|
* Background color of the decoration. Use rgba() and define transparent background colors to play well with other decorations.
|
|
924
|
-
* Alternatively a color from the color registry can be
|
|
940
|
+
* Alternatively a color from the color registry can be {@link ThemeColor referenced}.
|
|
925
941
|
*/
|
|
926
942
|
backgroundColor?: string | ThemeColor;
|
|
927
943
|
|
|
@@ -1069,7 +1085,7 @@ export module '@theia/plugin' {
|
|
|
1069
1085
|
}
|
|
1070
1086
|
|
|
1071
1087
|
/**
|
|
1072
|
-
* Represents different positions for rendering a decoration in an
|
|
1088
|
+
* Represents different positions for rendering a decoration in an {@link DecorationRenderOptions.overviewRulerLane overview ruler}.
|
|
1073
1089
|
* The overview ruler supports three lanes.
|
|
1074
1090
|
*/
|
|
1075
1091
|
export enum OverviewRulerLane {
|
|
@@ -1080,7 +1096,7 @@ export module '@theia/plugin' {
|
|
|
1080
1096
|
}
|
|
1081
1097
|
|
|
1082
1098
|
/**
|
|
1083
|
-
* Represents rendering styles for a
|
|
1099
|
+
* Represents rendering styles for a {@link TextEditorDecorationType text editor decoration}.
|
|
1084
1100
|
*/
|
|
1085
1101
|
export interface DecorationRenderOptions extends ThemableDecorationRenderOptions {
|
|
1086
1102
|
/**
|
|
@@ -1112,7 +1128,7 @@ export module '@theia/plugin' {
|
|
|
1112
1128
|
}
|
|
1113
1129
|
|
|
1114
1130
|
/**
|
|
1115
|
-
* Represents different
|
|
1131
|
+
* Represents different {@link TextEditor.revealRange reveal} strategies in a text editor.
|
|
1116
1132
|
*/
|
|
1117
1133
|
export enum TextEditorRevealType {
|
|
1118
1134
|
/**
|
|
@@ -1152,13 +1168,13 @@ export module '@theia/plugin' {
|
|
|
1152
1168
|
/**
|
|
1153
1169
|
* The selections in this text editor. The primary selection is always at index 0.
|
|
1154
1170
|
*/
|
|
1155
|
-
selections: Selection[];
|
|
1171
|
+
selections: readonly Selection[];
|
|
1156
1172
|
|
|
1157
1173
|
/**
|
|
1158
1174
|
* The current visible ranges in the editor (vertically).
|
|
1159
1175
|
* This accounts only for vertical scrolling, and not for horizontal scrolling.
|
|
1160
1176
|
*/
|
|
1161
|
-
readonly visibleRanges: Range[];
|
|
1177
|
+
readonly visibleRanges: readonly Range[];
|
|
1162
1178
|
|
|
1163
1179
|
/**
|
|
1164
1180
|
* Text editor options.
|
|
@@ -1167,9 +1183,10 @@ export module '@theia/plugin' {
|
|
|
1167
1183
|
|
|
1168
1184
|
/**
|
|
1169
1185
|
* The column in which this editor shows. Will be `undefined` in case this
|
|
1170
|
-
* isn't one of the
|
|
1186
|
+
* isn't one of the main editors, e.g. an embedded editor, or when the editor
|
|
1187
|
+
* column is larger than three.
|
|
1171
1188
|
*/
|
|
1172
|
-
viewColumn
|
|
1189
|
+
readonly viewColumn: ViewColumn | undefined;
|
|
1173
1190
|
|
|
1174
1191
|
/**
|
|
1175
1192
|
* Perform an edit on the document associated with this text editor.
|
|
@@ -1185,7 +1202,7 @@ export module '@theia/plugin' {
|
|
|
1185
1202
|
edit(callback: (editBuilder: TextEditorEdit) => void, options?: { undoStopBefore: boolean; undoStopAfter: boolean; }): Thenable<boolean>;
|
|
1186
1203
|
|
|
1187
1204
|
/**
|
|
1188
|
-
* Insert a
|
|
1205
|
+
* Insert a {@link SnippetString snippet} and put the editor into snippet mode. "Snippet mode"
|
|
1189
1206
|
* means the editor adds placeholders and additional cursors so that the user can complete
|
|
1190
1207
|
* or accept the snippet.
|
|
1191
1208
|
*
|
|
@@ -1199,12 +1216,12 @@ export module '@theia/plugin' {
|
|
|
1199
1216
|
|
|
1200
1217
|
/**
|
|
1201
1218
|
* Adds a set of decorations to the text editor. If a set of decorations already exists with
|
|
1202
|
-
* the given
|
|
1219
|
+
* the given {@link TextEditorDecorationType decoration type}, they will be replaced.
|
|
1203
1220
|
*
|
|
1204
|
-
* @see
|
|
1221
|
+
* @see {@link window.createTextEditorDecorationType createTextEditorDecorationType}.
|
|
1205
1222
|
*
|
|
1206
1223
|
* @param decorationType A decoration type.
|
|
1207
|
-
* @param rangesOrOptions Either
|
|
1224
|
+
* @param rangesOrOptions Either {@link Range ranges} or more detailed {@link DecorationOptions options}.
|
|
1208
1225
|
*/
|
|
1209
1226
|
setDecorations(decorationType: TextEditorDecorationType, rangesOrOptions: Range[] | DecorationOptions[]): void;
|
|
1210
1227
|
|
|
@@ -1217,11 +1234,11 @@ export module '@theia/plugin' {
|
|
|
1217
1234
|
revealRange(range: Range, revealType?: TextEditorRevealType): void;
|
|
1218
1235
|
|
|
1219
1236
|
/**
|
|
1220
|
-
* Shows this text editor. A
|
|
1237
|
+
* Shows this text editor. A {@link ViewColumn column} can be provided to control where the editor is being shown. Might change the {@link window.activeTextEditor active editor}.
|
|
1221
1238
|
*
|
|
1222
1239
|
* @deprecated use [window.showTextDocument](#Window.showTextDocument) instead.
|
|
1223
1240
|
*
|
|
1224
|
-
* @param column A
|
|
1241
|
+
* @param column A {@link ViewColumn view column} in which this editor should be shown.
|
|
1225
1242
|
*/
|
|
1226
1243
|
show(column?: ViewColumn): void;
|
|
1227
1244
|
|
|
@@ -1239,7 +1256,7 @@ export module '@theia/plugin' {
|
|
|
1239
1256
|
export interface TextEditorEdit {
|
|
1240
1257
|
/**
|
|
1241
1258
|
* Replace a certain text region with a new value.
|
|
1242
|
-
* You can use \r\n or \n in `value` and they will be normalized to the current
|
|
1259
|
+
* You can use \r\n or \n in `value` and they will be normalized to the current {@link TextDocument document}.
|
|
1243
1260
|
*
|
|
1244
1261
|
* @param location The range this operation should remove.
|
|
1245
1262
|
* @param value The new text this operation should insert after removing `location`.
|
|
@@ -1248,8 +1265,8 @@ export module '@theia/plugin' {
|
|
|
1248
1265
|
|
|
1249
1266
|
/**
|
|
1250
1267
|
* Insert text at a location.
|
|
1251
|
-
* You can use \r\n or \n in `value` and they will be normalized to the current
|
|
1252
|
-
* Although the equivalent text edit can be made with
|
|
1268
|
+
* You can use \r\n or \n in `value` and they will be normalized to the current {@link TextDocument document}.
|
|
1269
|
+
* Although the equivalent text edit can be made with {@link TextEditorEdit.replace replace}, `insert` will produce a different resulting selection (it will get moved).
|
|
1253
1270
|
*
|
|
1254
1271
|
* @param location The position where the new text should be inserted.
|
|
1255
1272
|
* @param value The new text this operation should insert.
|
|
@@ -1266,7 +1283,7 @@ export module '@theia/plugin' {
|
|
|
1266
1283
|
/**
|
|
1267
1284
|
* Set the end of line sequence.
|
|
1268
1285
|
*
|
|
1269
|
-
* @param endOfLine The new end of line for the
|
|
1286
|
+
* @param endOfLine The new end of line for the {@link TextDocument document}.
|
|
1270
1287
|
*/
|
|
1271
1288
|
setEndOfLine(endOfLine: EndOfLine): void;
|
|
1272
1289
|
}
|
|
@@ -1274,7 +1291,7 @@ export module '@theia/plugin' {
|
|
|
1274
1291
|
/**
|
|
1275
1292
|
* Represents a line of text, such as a line of source code.
|
|
1276
1293
|
*
|
|
1277
|
-
* TextLine objects are __immutable__. When a
|
|
1294
|
+
* TextLine objects are __immutable__. When a {@link TextDocument document} changes,
|
|
1278
1295
|
* previously retrieved lines will not represent the latest state.
|
|
1279
1296
|
*/
|
|
1280
1297
|
export interface TextLine {
|
|
@@ -1312,7 +1329,7 @@ export module '@theia/plugin' {
|
|
|
1312
1329
|
}
|
|
1313
1330
|
|
|
1314
1331
|
/**
|
|
1315
|
-
* Represents an end of line character sequence in a
|
|
1332
|
+
* Represents an end of line character sequence in a {@link TextDocument document}.
|
|
1316
1333
|
*/
|
|
1317
1334
|
export enum EndOfLine {
|
|
1318
1335
|
/**
|
|
@@ -1332,7 +1349,7 @@ export module '@theia/plugin' {
|
|
|
1332
1349
|
export class Uri {
|
|
1333
1350
|
|
|
1334
1351
|
/**
|
|
1335
|
-
* Create an URI from a file system path. The
|
|
1352
|
+
* Create an URI from a file system path. The {@link Uri.scheme scheme}
|
|
1336
1353
|
* will be `file`.
|
|
1337
1354
|
*
|
|
1338
1355
|
* @param path A file system or UNC path.
|
|
@@ -1359,7 +1376,7 @@ export module '@theia/plugin' {
|
|
|
1359
1376
|
* @param pathSegments One more more path fragments
|
|
1360
1377
|
* @returns A new uri which path is joined with the given fragments
|
|
1361
1378
|
*/
|
|
1362
|
-
static joinPath(uri:
|
|
1379
|
+
static joinPath(uri: Uri, ...pathSegments: string[]): Uri;
|
|
1363
1380
|
|
|
1364
1381
|
/**
|
|
1365
1382
|
* Create an URI from a string. Will throw if the given value is not
|
|
@@ -1457,7 +1474,7 @@ export module '@theia/plugin' {
|
|
|
1457
1474
|
|
|
1458
1475
|
/**
|
|
1459
1476
|
* Represents a text document, such as a source file. Text documents have
|
|
1460
|
-
*
|
|
1477
|
+
* {@link TextLine lines} and knowledge about an underlying resource like a file.
|
|
1461
1478
|
*/
|
|
1462
1479
|
export interface TextDocument {
|
|
1463
1480
|
/**
|
|
@@ -1466,8 +1483,8 @@ export module '@theia/plugin' {
|
|
|
1466
1483
|
* *Note* that most documents use the `file`-scheme, which means they are files on disk. However, **not** all documents are
|
|
1467
1484
|
* saved on disk and therefore the `scheme` must be checked before trying to access the underlying file or siblings on disk.
|
|
1468
1485
|
*
|
|
1469
|
-
* @see
|
|
1470
|
-
* @see
|
|
1486
|
+
* @see {@link FileSystemProvider FileSystemProvider}
|
|
1487
|
+
* @see {@link TextDocumentContentProvider TextDocumentContentProvider}
|
|
1471
1488
|
*/
|
|
1472
1489
|
readonly uri: Uri;
|
|
1473
1490
|
|
|
@@ -1480,7 +1497,7 @@ export module '@theia/plugin' {
|
|
|
1480
1497
|
/**
|
|
1481
1498
|
* Is this document representing an untitled file which has never been saved yet. *Note* that
|
|
1482
1499
|
* this does not mean the document will be saved to disk, use [`uri.scheme`](#Uri.scheme)
|
|
1483
|
-
* to figure out where a document will be
|
|
1500
|
+
* to figure out where a document will be {@link FileSystemProvider saved}, e.g. `file`, `ftp` etc.
|
|
1484
1501
|
*/
|
|
1485
1502
|
readonly isUntitled: boolean;
|
|
1486
1503
|
|
|
@@ -1513,10 +1530,10 @@ export module '@theia/plugin' {
|
|
|
1513
1530
|
* has been saved. If the file was not dirty or the save failed,
|
|
1514
1531
|
* will return false.
|
|
1515
1532
|
*/
|
|
1516
|
-
save():
|
|
1533
|
+
save(): Thenable<boolean>;
|
|
1517
1534
|
|
|
1518
1535
|
/**
|
|
1519
|
-
* The
|
|
1536
|
+
* The {@link EndOfLine end of line} sequence that is predominately
|
|
1520
1537
|
* used in this document.
|
|
1521
1538
|
*/
|
|
1522
1539
|
readonly eol: EndOfLine;
|
|
@@ -1532,7 +1549,7 @@ export module '@theia/plugin' {
|
|
|
1532
1549
|
* document are not reflected.
|
|
1533
1550
|
*
|
|
1534
1551
|
* @param line A line number in [0, lineCount).
|
|
1535
|
-
* @return A
|
|
1552
|
+
* @return A {@link TextLine line}.
|
|
1536
1553
|
*/
|
|
1537
1554
|
lineAt(line: number): TextLine;
|
|
1538
1555
|
|
|
@@ -1541,18 +1558,18 @@ export module '@theia/plugin' {
|
|
|
1541
1558
|
* that the returned object is *not* live and changes to the
|
|
1542
1559
|
* document are not reflected.
|
|
1543
1560
|
*
|
|
1544
|
-
* The position will be
|
|
1561
|
+
* The position will be {@link TextDocument.validatePosition adjusted}.
|
|
1545
1562
|
*
|
|
1546
1563
|
* @see [TextDocument.lineAt](#TextDocument.lineAt)
|
|
1547
1564
|
* @param position A position.
|
|
1548
|
-
* @return A
|
|
1565
|
+
* @return A {@link TextLine line}.
|
|
1549
1566
|
*/
|
|
1550
1567
|
lineAt(position: Position): TextLine;
|
|
1551
1568
|
|
|
1552
1569
|
/**
|
|
1553
1570
|
* Converts the position to a zero-based offset.
|
|
1554
1571
|
*
|
|
1555
|
-
* The position will be
|
|
1572
|
+
* The position will be {@link TextDocument.validatePosition adjusted}.
|
|
1556
1573
|
*
|
|
1557
1574
|
* @param position A position.
|
|
1558
1575
|
* @return A valid zero-based offset.
|
|
@@ -1563,13 +1580,13 @@ export module '@theia/plugin' {
|
|
|
1563
1580
|
* Converts a zero-based offset to a position.
|
|
1564
1581
|
*
|
|
1565
1582
|
* @param offset A zero-based offset.
|
|
1566
|
-
* @return A valid
|
|
1583
|
+
* @return A valid {@link Position position}.
|
|
1567
1584
|
*/
|
|
1568
1585
|
positionAt(offset: number): Position;
|
|
1569
1586
|
|
|
1570
1587
|
/**
|
|
1571
1588
|
* Get the text of this document. A substring can be retrieved by providing
|
|
1572
|
-
* a range. The range will be
|
|
1589
|
+
* a range. The range will be {@link TextDocument.validateRange adjusted}.
|
|
1573
1590
|
*
|
|
1574
1591
|
* @param range Include only the text included by the range.
|
|
1575
1592
|
* @return The text inside the provided range or the entire text.
|
|
@@ -1579,7 +1596,7 @@ export module '@theia/plugin' {
|
|
|
1579
1596
|
/**
|
|
1580
1597
|
* Get a word-range at the given position. By default words are defined by
|
|
1581
1598
|
* common separators, like space, -, _, etc. In addition, per language custom
|
|
1582
|
-
*
|
|
1599
|
+
* {@link LanguageConfiguration.wordPattern word definitions} can be defined. It
|
|
1583
1600
|
* is also possible to provide a custom regular expression.
|
|
1584
1601
|
*
|
|
1585
1602
|
* * *Note 1:* A custom regular expression must not match the empty string and
|
|
@@ -1588,7 +1605,7 @@ export module '@theia/plugin' {
|
|
|
1588
1605
|
* and in the name of speed regular expressions should not match words with
|
|
1589
1606
|
* spaces. Use [`TextLine.text`](#TextLine.text) for more complex, non-wordy, scenarios.
|
|
1590
1607
|
*
|
|
1591
|
-
* The position will be
|
|
1608
|
+
* The position will be {@link TextDocument.validatePosition adjusted}.
|
|
1592
1609
|
*
|
|
1593
1610
|
* @param position A position.
|
|
1594
1611
|
* @param regex Optional regular expression that describes what a word is.
|
|
@@ -1636,11 +1653,11 @@ export module '@theia/plugin' {
|
|
|
1636
1653
|
}
|
|
1637
1654
|
|
|
1638
1655
|
/**
|
|
1639
|
-
* An event that is fired when a
|
|
1656
|
+
* An event that is fired when a {@link TextDocument document} will be saved.
|
|
1640
1657
|
*
|
|
1641
1658
|
* To make modifications to the document before it is being saved, call the
|
|
1642
1659
|
* [`waitUntil`](#TextDocumentWillSaveEvent.waitUntil)-function with a thenable
|
|
1643
|
-
* that resolves to an array of
|
|
1660
|
+
* that resolves to an array of {@link TextEdit text edits}.
|
|
1644
1661
|
*/
|
|
1645
1662
|
export interface TextDocumentWillSaveEvent {
|
|
1646
1663
|
|
|
@@ -1691,7 +1708,7 @@ export module '@theia/plugin' {
|
|
|
1691
1708
|
*
|
|
1692
1709
|
* To make modifications to the workspace before the files are created,
|
|
1693
1710
|
* call the [`waitUntil](#FileWillCreateEvent.waitUntil)-function with a
|
|
1694
|
-
* thenable that resolves to a
|
|
1711
|
+
* thenable that resolves to a {@link WorkspaceEdit workspace edit}.
|
|
1695
1712
|
*/
|
|
1696
1713
|
export interface FileWillCreateEvent {
|
|
1697
1714
|
|
|
@@ -1701,7 +1718,7 @@ export module '@theia/plugin' {
|
|
|
1701
1718
|
readonly files: ReadonlyArray<Uri>;
|
|
1702
1719
|
|
|
1703
1720
|
/**
|
|
1704
|
-
* Allows to pause the event and to apply a
|
|
1721
|
+
* Allows to pause the event and to apply a {@link WorkspaceEdit workspace edit}.
|
|
1705
1722
|
*
|
|
1706
1723
|
* *Note:* This function can only be called during event dispatch and not
|
|
1707
1724
|
* in an asynchronous manner:
|
|
@@ -1746,7 +1763,7 @@ export module '@theia/plugin' {
|
|
|
1746
1763
|
*
|
|
1747
1764
|
* To make modifications to the workspace before the files are deleted,
|
|
1748
1765
|
* call the [`waitUntil](#FileWillCreateEvent.waitUntil)-function with a
|
|
1749
|
-
* thenable that resolves to a
|
|
1766
|
+
* thenable that resolves to a {@link WorkspaceEdit workspace edit}.
|
|
1750
1767
|
*/
|
|
1751
1768
|
export interface FileWillDeleteEvent {
|
|
1752
1769
|
|
|
@@ -1756,7 +1773,7 @@ export module '@theia/plugin' {
|
|
|
1756
1773
|
readonly files: ReadonlyArray<Uri>;
|
|
1757
1774
|
|
|
1758
1775
|
/**
|
|
1759
|
-
* Allows to pause the event and to apply a
|
|
1776
|
+
* Allows to pause the event and to apply a {@link WorkspaceEdit workspace edit}.
|
|
1760
1777
|
*
|
|
1761
1778
|
* *Note:* This function can only be called during event dispatch and not
|
|
1762
1779
|
* in an asynchronous manner:
|
|
@@ -1801,7 +1818,7 @@ export module '@theia/plugin' {
|
|
|
1801
1818
|
*
|
|
1802
1819
|
* To make modifications to the workspace before the files are renamed,
|
|
1803
1820
|
* call the [`waitUntil](#FileWillCreateEvent.waitUntil)-function with a
|
|
1804
|
-
* thenable that resolves to a
|
|
1821
|
+
* thenable that resolves to a {@link WorkspaceEdit workspace edit}.
|
|
1805
1822
|
*/
|
|
1806
1823
|
export interface FileWillRenameEvent {
|
|
1807
1824
|
|
|
@@ -1811,7 +1828,7 @@ export module '@theia/plugin' {
|
|
|
1811
1828
|
readonly files: ReadonlyArray<{ oldUri: Uri, newUri: Uri }>;
|
|
1812
1829
|
|
|
1813
1830
|
/**
|
|
1814
|
-
* Allows to pause the event and to apply a
|
|
1831
|
+
* Allows to pause the event and to apply a {@link WorkspaceEdit workspace edit}.
|
|
1815
1832
|
*
|
|
1816
1833
|
* *Note:* This function can only be called during event dispatch and not
|
|
1817
1834
|
* in an asynchronous manner:
|
|
@@ -1944,7 +1961,7 @@ export module '@theia/plugin' {
|
|
|
1944
1961
|
/**
|
|
1945
1962
|
* The size in spaces a tab takes. This is used for two purposes:
|
|
1946
1963
|
* - the rendering width of a tab character;
|
|
1947
|
-
* - the number of spaces to insert when
|
|
1964
|
+
* - the number of spaces to insert when {@link TextEditorOptions.insertSpaces insertSpaces} is true.
|
|
1948
1965
|
*
|
|
1949
1966
|
* When getting a text editor's options, this property will always be a number (resolved).
|
|
1950
1967
|
* When setting a text editor's options, this property is optional and it can be a number or `"auto"`.
|
|
@@ -1952,7 +1969,7 @@ export module '@theia/plugin' {
|
|
|
1952
1969
|
tabSize?: number | string;
|
|
1953
1970
|
|
|
1954
1971
|
/**
|
|
1955
|
-
* When pressing Tab insert
|
|
1972
|
+
* When pressing Tab insert {@link TextEditorOptions.tabSize n} spaces.
|
|
1956
1973
|
* When getting a text editor's options, this property will always be a boolean (resolved).
|
|
1957
1974
|
* When setting a text editor's options, this property is optional and it can be a boolean or `"auto"`.
|
|
1958
1975
|
*/
|
|
@@ -1981,13 +1998,13 @@ export module '@theia/plugin' {
|
|
|
1981
1998
|
export enum ViewColumn {
|
|
1982
1999
|
/**
|
|
1983
2000
|
* A *symbolic* editor column representing the currently active column. This value
|
|
1984
|
-
* can be used when opening editors, but the *resolved*
|
|
2001
|
+
* can be used when opening editors, but the *resolved* {@link TextEditor.viewColumn viewColumn}-value
|
|
1985
2002
|
* of editors will always be `One`, `Two`, `Three`,... or `undefined` but never `Active`.
|
|
1986
2003
|
*/
|
|
1987
2004
|
Active = -1,
|
|
1988
2005
|
/**
|
|
1989
2006
|
* A *symbolic* editor column representing the column to the side of the active one. This value
|
|
1990
|
-
* can be used when opening editors, but the *resolved*
|
|
2007
|
+
* can be used when opening editors, but the *resolved* {@link TextEditor.viewColumn viewColumn}-value
|
|
1991
2008
|
* of editors will always be `One`, `Two`, `Three`,... or `undefined` but never `Beside`.
|
|
1992
2009
|
*/
|
|
1993
2010
|
Beside = -2,
|
|
@@ -2045,7 +2062,7 @@ export module '@theia/plugin' {
|
|
|
2045
2062
|
}
|
|
2046
2063
|
|
|
2047
2064
|
/**
|
|
2048
|
-
* An event emitter used to create and fire an
|
|
2065
|
+
* An event emitter used to create and fire an {@link Event event} or to subscribe to.
|
|
2049
2066
|
*/
|
|
2050
2067
|
export class EventEmitter<T> {
|
|
2051
2068
|
/**
|
|
@@ -2070,7 +2087,7 @@ export module '@theia/plugin' {
|
|
|
2070
2087
|
* on disk.
|
|
2071
2088
|
*
|
|
2072
2089
|
* To get an instance of a `FileSystemWatcher` use
|
|
2073
|
-
*
|
|
2090
|
+
* {@link workspace.createFileSystemWatcher createFileSystemWatcher}.
|
|
2074
2091
|
*/
|
|
2075
2092
|
export interface FileSystemWatcher extends Disposable {
|
|
2076
2093
|
|
|
@@ -2127,7 +2144,7 @@ export module '@theia/plugin' {
|
|
|
2127
2144
|
}
|
|
2128
2145
|
|
|
2129
2146
|
/**
|
|
2130
|
-
* A cancellation token source create and manage a
|
|
2147
|
+
* A cancellation token source create and manage a {@link CancellationToken cancellation token}
|
|
2131
2148
|
*/
|
|
2132
2149
|
export class CancellationTokenSource {
|
|
2133
2150
|
token: CancellationToken;
|
|
@@ -2139,9 +2156,9 @@ export module '@theia/plugin' {
|
|
|
2139
2156
|
* A text document content provider allows to add readonly documents
|
|
2140
2157
|
* to the editor, such as source from a dll or generated html from md.
|
|
2141
2158
|
*
|
|
2142
|
-
* Content providers are
|
|
2159
|
+
* Content providers are {@link workspace.registerTextDocumentContentProvider registered}
|
|
2143
2160
|
* for a [uri-scheme](#Uri.scheme). When a uri with that scheme is to
|
|
2144
|
-
* be
|
|
2161
|
+
* be {@link workspace.openTextDocument loaded} the content provider is
|
|
2145
2162
|
* asked.
|
|
2146
2163
|
*/
|
|
2147
2164
|
export interface TextDocumentContentProvider {
|
|
@@ -2155,10 +2172,10 @@ export module '@theia/plugin' {
|
|
|
2155
2172
|
* Provide textual content for a given uri.
|
|
2156
2173
|
*
|
|
2157
2174
|
* The editor will use the returned string-content to create a readonly
|
|
2158
|
-
*
|
|
2159
|
-
* the corresponding document has been
|
|
2175
|
+
* {@link TextDocument document}. Resources allocated should be released when
|
|
2176
|
+
* the corresponding document has been {@link workspace.onDidCloseTextDocument closed}.
|
|
2160
2177
|
*
|
|
2161
|
-
* @param uri An uri which scheme matches the scheme this provider was
|
|
2178
|
+
* @param uri An uri which scheme matches the scheme this provider was {@link workspace.registerTextDocumentContentProvider registered} for.
|
|
2162
2179
|
* @param token A cancellation token.
|
|
2163
2180
|
* @return A string or a thenable that resolves to such.
|
|
2164
2181
|
*/
|
|
@@ -2209,9 +2226,9 @@ export module '@theia/plugin' {
|
|
|
2209
2226
|
}
|
|
2210
2227
|
|
|
2211
2228
|
/**
|
|
2212
|
-
* A concrete
|
|
2229
|
+
* A concrete {@link QuickInput QuickInput} to let the user pick an item from a
|
|
2213
2230
|
* list of items of type T. The items can be filtered through a filter text field and
|
|
2214
|
-
* there is an option
|
|
2231
|
+
* there is an option {@link QuickPick.canSelectMany canSelectMany} to allow for
|
|
2215
2232
|
* selecting multiple items.
|
|
2216
2233
|
*
|
|
2217
2234
|
* Note that in many cases the more convenient [window.showQuickPick](#window.showQuickPick)
|
|
@@ -2253,7 +2270,7 @@ export module '@theia/plugin' {
|
|
|
2253
2270
|
/**
|
|
2254
2271
|
* Items to pick from.
|
|
2255
2272
|
*/
|
|
2256
|
-
items:
|
|
2273
|
+
items: readonly T[];
|
|
2257
2274
|
|
|
2258
2275
|
/**
|
|
2259
2276
|
* If multiple items can be selected at the same time. Defaults to false.
|
|
@@ -2278,22 +2295,22 @@ export module '@theia/plugin' {
|
|
|
2278
2295
|
/**
|
|
2279
2296
|
* Active items. This can be read and updated by the extension.
|
|
2280
2297
|
*/
|
|
2281
|
-
activeItems:
|
|
2298
|
+
activeItems: readonly T[];
|
|
2282
2299
|
|
|
2283
2300
|
/**
|
|
2284
2301
|
* An event signaling when the active items have changed.
|
|
2285
2302
|
*/
|
|
2286
|
-
readonly onDidChangeActive: Event<T[]>;
|
|
2303
|
+
readonly onDidChangeActive: Event<readonly T[]>;
|
|
2287
2304
|
|
|
2288
2305
|
/**
|
|
2289
2306
|
* Selected items. This can be read and updated by the extension.
|
|
2290
2307
|
*/
|
|
2291
|
-
selectedItems:
|
|
2308
|
+
selectedItems: readonly T[];
|
|
2292
2309
|
|
|
2293
2310
|
/**
|
|
2294
2311
|
* An event signaling when the selected items have changed.
|
|
2295
2312
|
*/
|
|
2296
|
-
readonly onDidChangeSelection: Event<T[]>;
|
|
2313
|
+
readonly onDidChangeSelection: Event<readonly T[]>;
|
|
2297
2314
|
}
|
|
2298
2315
|
|
|
2299
2316
|
/**
|
|
@@ -2338,7 +2355,7 @@ export module '@theia/plugin' {
|
|
|
2338
2355
|
}
|
|
2339
2356
|
|
|
2340
2357
|
/**
|
|
2341
|
-
* Options to configure the behaviour of the
|
|
2358
|
+
* Options to configure the behaviour of the {@link WorkspaceFolder workspace folder} pick UI.
|
|
2342
2359
|
*/
|
|
2343
2360
|
export interface WorkspaceFolderPickOptions {
|
|
2344
2361
|
|
|
@@ -2353,6 +2370,32 @@ export module '@theia/plugin' {
|
|
|
2353
2370
|
ignoreFocusOut?: boolean;
|
|
2354
2371
|
}
|
|
2355
2372
|
|
|
2373
|
+
/**
|
|
2374
|
+
* Impacts the behavior and appearance of the validation message.
|
|
2375
|
+
*/
|
|
2376
|
+
export enum InputBoxValidationSeverity {
|
|
2377
|
+
Info = 1,
|
|
2378
|
+
Warning = 2,
|
|
2379
|
+
Error = 3
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
/**
|
|
2383
|
+
* Object to configure the behavior of the validation message.
|
|
2384
|
+
*/
|
|
2385
|
+
export interface InputBoxValidationMessage {
|
|
2386
|
+
/**
|
|
2387
|
+
* The validation message to display.
|
|
2388
|
+
*/
|
|
2389
|
+
readonly message: string;
|
|
2390
|
+
|
|
2391
|
+
/**
|
|
2392
|
+
* The severity of the validation message.
|
|
2393
|
+
* NOTE: When using `InputBoxValidationSeverity.Error`, the user will not be allowed to accept (hit ENTER) the input.
|
|
2394
|
+
* `Info` and `Warning` will still allow the InputBox to accept the input.
|
|
2395
|
+
*/
|
|
2396
|
+
readonly severity: InputBoxValidationSeverity;
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2356
2399
|
/**
|
|
2357
2400
|
* Options to configure the behavior of the input box UI.
|
|
2358
2401
|
*/
|
|
@@ -2401,10 +2444,11 @@ export module '@theia/plugin' {
|
|
|
2401
2444
|
* to the user.
|
|
2402
2445
|
*
|
|
2403
2446
|
* @param value The current value of the input box.
|
|
2404
|
-
* @return
|
|
2405
|
-
* Return `undefined`, or the empty string when 'value' is valid.
|
|
2447
|
+
* @return Either a human-readable string which is presented as an error message or an {@link InputBoxValidationMessage}
|
|
2448
|
+
* which can provide a specific message severity. Return `undefined`, `null`, or the empty string when 'value' is valid.
|
|
2406
2449
|
*/
|
|
2407
|
-
validateInput
|
|
2450
|
+
validateInput?(value: string): string | InputBoxValidationMessage | undefined | null |
|
|
2451
|
+
Thenable<string | InputBoxValidationMessage | undefined | null>;
|
|
2408
2452
|
|
|
2409
2453
|
/**
|
|
2410
2454
|
* An optional function that will be called on Enter key.
|
|
@@ -2416,13 +2460,13 @@ export module '@theia/plugin' {
|
|
|
2416
2460
|
* Namespace for dealing with commands. In short, a command is a function with a
|
|
2417
2461
|
* unique identifier. The function is sometimes also called _command handler_.
|
|
2418
2462
|
*
|
|
2419
|
-
* Commands can be added using the
|
|
2420
|
-
*
|
|
2463
|
+
* Commands can be added using the {@link commands.registerCommand registerCommand} and
|
|
2464
|
+
* {@link commands.registerTextEditorCommand registerTextEditorCommand} functions.
|
|
2421
2465
|
* Registration can be split in two step: first register command without handler,
|
|
2422
2466
|
* second register handler by command id.
|
|
2423
2467
|
*
|
|
2424
2468
|
* Any contributed command are available to any plugin, command can be invoked
|
|
2425
|
-
* by
|
|
2469
|
+
* by {@link commands.executeCommand executeCommand} function.
|
|
2426
2470
|
*
|
|
2427
2471
|
* Simple example that register command:
|
|
2428
2472
|
* ```javascript
|
|
@@ -2459,13 +2503,13 @@ export module '@theia/plugin' {
|
|
|
2459
2503
|
* Registers a text editor command that can be invoked via a keyboard shortcut,
|
|
2460
2504
|
* a menu item, an action, or directly.
|
|
2461
2505
|
*
|
|
2462
|
-
* Text editor commands are different from ordinary
|
|
2506
|
+
* Text editor commands are different from ordinary {@link commands.registerCommand commands} as
|
|
2463
2507
|
* they only execute when there is an active editor when the command is called. Also, the
|
|
2464
2508
|
* command handler of an editor command has access to the active editor and to an
|
|
2465
|
-
*
|
|
2509
|
+
* {@link TextEditorEdit edit}-builder.
|
|
2466
2510
|
*
|
|
2467
2511
|
* @param command A unique identifier for the command.
|
|
2468
|
-
* @param callback A command handler function with access to an
|
|
2512
|
+
* @param callback A command handler function with access to an {@link TextEditor editor} and an {@link TextEditorEdit edit}.
|
|
2469
2513
|
* @param thisArg The `this` context used when invoking the handler function.
|
|
2470
2514
|
* @return Disposable which unregisters this command on disposal.
|
|
2471
2515
|
*/
|
|
@@ -2659,7 +2703,7 @@ export module '@theia/plugin' {
|
|
|
2659
2703
|
}
|
|
2660
2704
|
|
|
2661
2705
|
/**
|
|
2662
|
-
* A reference to a named icon. Currently only
|
|
2706
|
+
* A reference to a named icon. Currently only {@link ThemeIcon.File File} and {@link ThemeIcon.Folder Folder} are supported.
|
|
2663
2707
|
* Using a theme icon is preferred over a custom icon as it gives theme authors the possibility to change the icons.
|
|
2664
2708
|
*/
|
|
2665
2709
|
export class ThemeIcon {
|
|
@@ -2688,7 +2732,7 @@ export module '@theia/plugin' {
|
|
|
2688
2732
|
* @param id id of the icon. The available icons are listed in https://code.visualstudio.com/api/references/icons-in-labels#icon-listing.
|
|
2689
2733
|
* @param color optional `ThemeColor` for the icon. The color is currently only used in {@link TreeItem}.
|
|
2690
2734
|
*/
|
|
2691
|
-
private constructor(
|
|
2735
|
+
private constructor(id: string, color?: ThemeColor);
|
|
2692
2736
|
}
|
|
2693
2737
|
|
|
2694
2738
|
/**
|
|
@@ -2741,7 +2785,7 @@ export module '@theia/plugin' {
|
|
|
2741
2785
|
/**
|
|
2742
2786
|
* Reveal this channel in the UI.
|
|
2743
2787
|
*
|
|
2744
|
-
* @param preserveFocus When
|
|
2788
|
+
* @param preserveFocus When `true` the channel will not take focus.
|
|
2745
2789
|
*/
|
|
2746
2790
|
show(preserveFocus?: boolean): void;
|
|
2747
2791
|
|
|
@@ -2930,7 +2974,7 @@ export module '@theia/plugin' {
|
|
|
2930
2974
|
/**
|
|
2931
2975
|
* Current working directory.
|
|
2932
2976
|
*/
|
|
2933
|
-
cwd?: string |
|
|
2977
|
+
cwd?: string | Uri;
|
|
2934
2978
|
|
|
2935
2979
|
/**
|
|
2936
2980
|
* Environment variables for terminal in format key - value.
|
|
@@ -2981,7 +3025,7 @@ export module '@theia/plugin' {
|
|
|
2981
3025
|
|
|
2982
3026
|
/**
|
|
2983
3027
|
* Options a virtual process terminal.
|
|
2984
|
-
* @deprecated since 1.23.0 - Use
|
|
3028
|
+
* @deprecated since 1.23.0 - Use {@link ExtensionTerminalOptions ExtensionTerminalOptions} instead.
|
|
2985
3029
|
*/
|
|
2986
3030
|
export interface PseudoTerminalOptions {
|
|
2987
3031
|
/**
|
|
@@ -2990,7 +3034,7 @@ export module '@theia/plugin' {
|
|
|
2990
3034
|
name: string;
|
|
2991
3035
|
|
|
2992
3036
|
/**
|
|
2993
|
-
* An implementation of
|
|
3037
|
+
* An implementation of {@link Pseudoterminal Pseudoterminal} where an extension can
|
|
2994
3038
|
* control it.
|
|
2995
3039
|
*/
|
|
2996
3040
|
pty: Pseudoterminal;
|
|
@@ -3006,7 +3050,7 @@ export module '@theia/plugin' {
|
|
|
3006
3050
|
name: string;
|
|
3007
3051
|
|
|
3008
3052
|
/**
|
|
3009
|
-
* An implementation of
|
|
3053
|
+
* An implementation of {@link Pseudoterminal Pseudoterminal} where an extension can
|
|
3010
3054
|
* control it.
|
|
3011
3055
|
*/
|
|
3012
3056
|
pty: Pseudoterminal;
|
|
@@ -3165,7 +3209,7 @@ export module '@theia/plugin' {
|
|
|
3165
3209
|
*
|
|
3166
3210
|
* *Note* that this event should be used to propagate information about children.
|
|
3167
3211
|
*
|
|
3168
|
-
* @see
|
|
3212
|
+
* @see {@link EventEmitter EventEmitter}
|
|
3169
3213
|
*/
|
|
3170
3214
|
onDidChangeFileDecorations?: Event<undefined | Uri | Uri[]>;
|
|
3171
3215
|
|
|
@@ -3174,7 +3218,7 @@ export module '@theia/plugin' {
|
|
|
3174
3218
|
*
|
|
3175
3219
|
* *Note* that this function is only called when a file gets rendered in the UI.
|
|
3176
3220
|
* This means a decoration from a descendent that propagates upwards must be signaled
|
|
3177
|
-
* to the editor via the
|
|
3221
|
+
* to the editor via the {@link FileDecorationProvider.onDidChangeFileDecorations onDidChangeFileDecorations}-event.
|
|
3178
3222
|
*
|
|
3179
3223
|
* @param uri The uri of the file to provide a decoration for.
|
|
3180
3224
|
* @param token A cancellation token.
|
|
@@ -3332,13 +3376,13 @@ export module '@theia/plugin' {
|
|
|
3332
3376
|
|
|
3333
3377
|
/**
|
|
3334
3378
|
* A memento object that stores state in the context
|
|
3335
|
-
* of the currently opened
|
|
3379
|
+
* of the currently opened {@link workspace.workspaceFolders workspace}.
|
|
3336
3380
|
*/
|
|
3337
3381
|
workspaceState: Memento;
|
|
3338
3382
|
|
|
3339
3383
|
/**
|
|
3340
3384
|
* A memento object that stores state independent
|
|
3341
|
-
* of the current opened
|
|
3385
|
+
* of the current opened {@link workspace.workspaceFolders workspace}.
|
|
3342
3386
|
*/
|
|
3343
3387
|
globalState: Memento & {
|
|
3344
3388
|
/**
|
|
@@ -3394,7 +3438,7 @@ export module '@theia/plugin' {
|
|
|
3394
3438
|
* Use [`workspaceState`](#PluginContext.workspaceState) or
|
|
3395
3439
|
* [`globalState`](#PluginContext.globalState) to store key value data.
|
|
3396
3440
|
*
|
|
3397
|
-
* @deprecated Use
|
|
3441
|
+
* @deprecated Use {@link PluginContext.storageUri storageUri} instead.
|
|
3398
3442
|
*/
|
|
3399
3443
|
storagePath: string | undefined;
|
|
3400
3444
|
|
|
@@ -3419,7 +3463,7 @@ export module '@theia/plugin' {
|
|
|
3419
3463
|
*
|
|
3420
3464
|
* Use [`globalState`](#PluginContext.globalState) to store key value data.
|
|
3421
3465
|
*
|
|
3422
|
-
* @deprecated Use
|
|
3466
|
+
* @deprecated Use {@link PluginContext.globalStorageUri globalStorageUri} instead.
|
|
3423
3467
|
*/
|
|
3424
3468
|
readonly globalStoragePath: string;
|
|
3425
3469
|
|
|
@@ -3906,14 +3950,14 @@ export module '@theia/plugin' {
|
|
|
3906
3950
|
}
|
|
3907
3951
|
|
|
3908
3952
|
/**
|
|
3909
|
-
* A uri handler is responsible for handling system-wide
|
|
3953
|
+
* A uri handler is responsible for handling system-wide {@link Uri uris}.
|
|
3910
3954
|
*
|
|
3911
3955
|
* @see [window.registerUriHandler](#window.registerUriHandler).
|
|
3912
3956
|
*/
|
|
3913
3957
|
export interface UriHandler {
|
|
3914
3958
|
|
|
3915
3959
|
/**
|
|
3916
|
-
* Handle the provided system-wide
|
|
3960
|
+
* Handle the provided system-wide {@link Uri uri}.
|
|
3917
3961
|
*
|
|
3918
3962
|
* @see [window.registerUriHandler](#window.registerUriHandler).
|
|
3919
3963
|
*/
|
|
@@ -3975,7 +4019,7 @@ export module '@theia/plugin' {
|
|
|
3975
4019
|
/**
|
|
3976
4020
|
* Event triggered by extensions to signal that an edit has occurred on an [`CustomDocument`](#CustomDocument).
|
|
3977
4021
|
*
|
|
3978
|
-
* @see
|
|
4022
|
+
* @see {@link CustomEditorProvider.onDidChangeCustomDocument}.
|
|
3979
4023
|
*/
|
|
3980
4024
|
interface CustomDocumentEditEvent<T extends CustomDocument = CustomDocument> {
|
|
3981
4025
|
|
|
@@ -4014,7 +4058,7 @@ export module '@theia/plugin' {
|
|
|
4014
4058
|
* Event triggered by extensions to signal to Theia that the content of a [`CustomDocument`](#CustomDocument)
|
|
4015
4059
|
* has changed.
|
|
4016
4060
|
*
|
|
4017
|
-
* @see
|
|
4061
|
+
* @see {@link CustomEditorProvider.onDidChangeCustomDocument}.
|
|
4018
4062
|
*/
|
|
4019
4063
|
interface CustomDocumentContentChangeEvent<T extends CustomDocument = CustomDocument> {
|
|
4020
4064
|
/**
|
|
@@ -4160,7 +4204,7 @@ export module '@theia/plugin' {
|
|
|
4160
4204
|
*
|
|
4161
4205
|
* An editor should only ever fire `CustomDocumentEditEvent` events, or only ever fire `CustomDocumentContentChangeEvent` events.
|
|
4162
4206
|
*/
|
|
4163
|
-
readonly onDidChangeCustomDocument: Event<
|
|
4207
|
+
readonly onDidChangeCustomDocument: Event<CustomDocumentEditEvent<T>> | Event<CustomDocumentContentChangeEvent<T>>;
|
|
4164
4208
|
|
|
4165
4209
|
/**
|
|
4166
4210
|
* Save a custom document.
|
|
@@ -4377,83 +4421,83 @@ export module '@theia/plugin' {
|
|
|
4377
4421
|
/**
|
|
4378
4422
|
* The currently opened terminals or an empty array.
|
|
4379
4423
|
*/
|
|
4380
|
-
export let terminals:
|
|
4424
|
+
export let terminals: readonly Terminal[];
|
|
4381
4425
|
|
|
4382
4426
|
/**
|
|
4383
4427
|
* The currently visible editors or an empty array.
|
|
4384
4428
|
*/
|
|
4385
|
-
export let visibleTextEditors: TextEditor[];
|
|
4429
|
+
export let visibleTextEditors: readonly TextEditor[];
|
|
4386
4430
|
|
|
4387
4431
|
/**
|
|
4388
|
-
* An
|
|
4432
|
+
* An {@link Event event} which fires when the {@link window.activeTerminal active terminal} has changed.
|
|
4389
4433
|
* *Note* that the event also fires when the active terminal changes to `undefined`.
|
|
4390
4434
|
*/
|
|
4391
4435
|
export const onDidChangeActiveTerminal: Event<Terminal | undefined>;
|
|
4392
4436
|
|
|
4393
4437
|
/**
|
|
4394
|
-
* An
|
|
4438
|
+
* An {@link Event event} which fires when the {@link window.activeTextEditor active editor}
|
|
4395
4439
|
* has changed. *Note* that the event also fires when the active editor changes
|
|
4396
4440
|
* to `undefined`.
|
|
4397
4441
|
*/
|
|
4398
4442
|
export const onDidChangeActiveTextEditor: Event<TextEditor | undefined>;
|
|
4399
4443
|
|
|
4400
4444
|
/**
|
|
4401
|
-
* An
|
|
4445
|
+
* An {@link Event event} which fires when the array of {@link window.visibleTextEditors visible editors}
|
|
4402
4446
|
* has changed.
|
|
4403
4447
|
*/
|
|
4404
|
-
export const onDidChangeVisibleTextEditors: Event<TextEditor[]>;
|
|
4448
|
+
export const onDidChangeVisibleTextEditors: Event<readonly TextEditor[]>;
|
|
4405
4449
|
|
|
4406
4450
|
/**
|
|
4407
|
-
* An
|
|
4451
|
+
* An {@link Event event} which fires when the selection in an editor has changed.
|
|
4408
4452
|
*/
|
|
4409
4453
|
export const onDidChangeTextEditorSelection: Event<TextEditorSelectionChangeEvent>;
|
|
4410
4454
|
|
|
4411
4455
|
/**
|
|
4412
|
-
* An
|
|
4456
|
+
* An {@link Event event} which fires when the selection in an editor has changed.
|
|
4413
4457
|
*/
|
|
4414
4458
|
export const onDidChangeTextEditorVisibleRanges: Event<TextEditorVisibleRangesChangeEvent>;
|
|
4415
4459
|
|
|
4416
4460
|
/**
|
|
4417
|
-
* An
|
|
4461
|
+
* An {@link Event event} which fires when the options of an editor have changed.
|
|
4418
4462
|
*/
|
|
4419
4463
|
export const onDidChangeTextEditorOptions: Event<TextEditorOptionsChangeEvent>;
|
|
4420
4464
|
|
|
4421
4465
|
/**
|
|
4422
|
-
* An
|
|
4466
|
+
* An {@link Event event} which fires when the view column of an editor has changed.
|
|
4423
4467
|
*/
|
|
4424
4468
|
export const onDidChangeTextEditorViewColumn: Event<TextEditorViewColumnChangeEvent>;
|
|
4425
4469
|
|
|
4426
4470
|
/**
|
|
4427
|
-
* Show the given document in a text editor. A
|
|
4428
|
-
* to control where the editor is being shown. Might change the
|
|
4471
|
+
* Show the given document in a text editor. A {@link ViewColumn column} can be provided
|
|
4472
|
+
* to control where the editor is being shown. Might change the {@link window.activeTextEditor active editor}.
|
|
4429
4473
|
*
|
|
4430
4474
|
* @param document A text document to be shown.
|
|
4431
|
-
* @param column A view column in which the
|
|
4432
|
-
* are adjusted to be `Min(column, columnCount + 1)`, the
|
|
4475
|
+
* @param column A view column in which the {@link TextEditor editor} should be shown. The default is the {@link ViewColumn.Active active}, other values
|
|
4476
|
+
* are adjusted to be `Min(column, columnCount + 1)`, the {@link ViewColumn.Active active}-column is not adjusted. Use [`ViewColumn.Beside`](#ViewColumn.Beside)
|
|
4433
4477
|
* to open the editor to the side of the currently active one.
|
|
4434
4478
|
* @param preserveFocus When `true` the editor will not take focus.
|
|
4435
|
-
* @return A promise that resolves to an
|
|
4479
|
+
* @return A promise that resolves to an {@link TextEditor editor}.
|
|
4436
4480
|
*/
|
|
4437
4481
|
export function showTextDocument(document: TextDocument, column?: ViewColumn, preserveFocus?: boolean): Thenable<TextEditor>;
|
|
4438
4482
|
|
|
4439
4483
|
/**
|
|
4440
|
-
* Show the given document in a text editor.
|
|
4441
|
-
* to control options of the editor is being shown. Might change the
|
|
4484
|
+
* Show the given document in a text editor. {@link TextDocumentShowOptions Options} can be provided
|
|
4485
|
+
* to control options of the editor is being shown. Might change the {@link window.activeTextEditor active editor}.
|
|
4442
4486
|
*
|
|
4443
4487
|
* @param document A text document to be shown.
|
|
4444
|
-
* @param options
|
|
4445
|
-
* @return A promise that resolves to an
|
|
4488
|
+
* @param options {@link TextDocumentShowOptions Editor options} to configure the behavior of showing the {@link TextEditor editor}.
|
|
4489
|
+
* @return A promise that resolves to an {@link TextEditor editor}.
|
|
4446
4490
|
*/
|
|
4447
4491
|
export function showTextDocument(document: TextDocument, options?: TextDocumentShowOptions): Thenable<TextEditor>;
|
|
4448
4492
|
|
|
4449
4493
|
/**
|
|
4450
4494
|
* A short-hand for `openTextDocument(uri).then(document => showTextDocument(document, options))`.
|
|
4451
4495
|
*
|
|
4452
|
-
* @see
|
|
4496
|
+
* @see {@link openTextDocument openTextDocument}
|
|
4453
4497
|
*
|
|
4454
4498
|
* @param uri A resource identifier.
|
|
4455
|
-
* @param options
|
|
4456
|
-
* @return A promise that resolves to an
|
|
4499
|
+
* @param options {@link TextDocumentShowOptions Editor options} to configure the behavior of showing the {@link TextEditor editor}.
|
|
4500
|
+
* @return A promise that resolves to an {@link TextEditor editor}.
|
|
4457
4501
|
*/
|
|
4458
4502
|
export function showTextDocument(uri: Uri, options?: TextDocumentShowOptions): Thenable<TextEditor>;
|
|
4459
4503
|
|
|
@@ -4465,7 +4509,7 @@ export module '@theia/plugin' {
|
|
|
4465
4509
|
* @param token A token that can be used to signal cancellation.
|
|
4466
4510
|
* @return A promise that resolves to the selection or `undefined`.
|
|
4467
4511
|
*/
|
|
4468
|
-
export function showQuickPick(
|
|
4512
|
+
export function showQuickPick(items: readonly string[] | Thenable<readonly string[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<string | undefined>;
|
|
4469
4513
|
|
|
4470
4514
|
/**
|
|
4471
4515
|
* Shows a selection list allowing multiple selections.
|
|
@@ -4475,7 +4519,7 @@ export module '@theia/plugin' {
|
|
|
4475
4519
|
* @param token A token that can be used to signal cancellation.
|
|
4476
4520
|
* @return A promise that resolves to the selected items or `undefined`.
|
|
4477
4521
|
*/
|
|
4478
|
-
export function showQuickPick(
|
|
4522
|
+
export function showQuickPick(items: readonly string[] | Thenable<readonly string[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable<string[] | undefined>;
|
|
4479
4523
|
|
|
4480
4524
|
/**
|
|
4481
4525
|
* Shows a selection list.
|
|
@@ -4485,7 +4529,7 @@ export module '@theia/plugin' {
|
|
|
4485
4529
|
* @param token A token that can be used to signal cancellation.
|
|
4486
4530
|
* @return A promise that resolves to the selected item or `undefined`.
|
|
4487
4531
|
*/
|
|
4488
|
-
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options
|
|
4532
|
+
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options?: QuickPickOptions, token?: CancellationToken): Thenable<T | undefined>;
|
|
4489
4533
|
|
|
4490
4534
|
/**
|
|
4491
4535
|
* Shows a selection list allowing multiple selections.
|
|
@@ -4498,19 +4542,19 @@ export module '@theia/plugin' {
|
|
|
4498
4542
|
export function showQuickPick<T extends QuickPickItem>(items: readonly T[] | Thenable<readonly T[]>, options: QuickPickOptions & { canPickMany: true }, token?: CancellationToken): Thenable<T[] | undefined>;
|
|
4499
4543
|
|
|
4500
4544
|
/**
|
|
4501
|
-
* Creates a
|
|
4545
|
+
* Creates a {@link QuickPick QuickPick} to let the user pick an item from a list
|
|
4502
4546
|
* of items of type T.
|
|
4503
4547
|
*
|
|
4504
4548
|
* Note that in many cases the more convenient [window.showQuickPick](#window.showQuickPick)
|
|
4505
4549
|
* is easier to use. [window.createQuickPick](#window.createQuickPick) should be used
|
|
4506
4550
|
* when [window.showQuickPick](#window.showQuickPick) does not offer the required flexibility.
|
|
4507
4551
|
*
|
|
4508
|
-
* @return A new
|
|
4552
|
+
* @return A new {@link QuickPick QuickPick}.
|
|
4509
4553
|
*/
|
|
4510
4554
|
export function createQuickPick<T extends QuickPickItem>(): QuickPick<T>;
|
|
4511
4555
|
|
|
4512
4556
|
/**
|
|
4513
|
-
* Shows a selection list of
|
|
4557
|
+
* Shows a selection list of {@link workspace.workspaceFolders workspace folders} to pick from.
|
|
4514
4558
|
* Returns `undefined` if no folder is open.
|
|
4515
4559
|
*
|
|
4516
4560
|
* @param options Configures the behavior of the workspace folder list.
|
|
@@ -4689,7 +4733,7 @@ export module '@theia/plugin' {
|
|
|
4689
4733
|
* Registers a webview panel serializer.
|
|
4690
4734
|
*
|
|
4691
4735
|
* Plugins that support reviving should have an `"onWebviewPanel:viewType"` activation event and
|
|
4692
|
-
* make sure that
|
|
4736
|
+
* make sure that {@link registerWebviewPanelSerializer registerWebviewPanelSerializer} is called during activation.
|
|
4693
4737
|
*
|
|
4694
4738
|
* Only a single serializer may be registered at a time for a given `viewType`.
|
|
4695
4739
|
*
|
|
@@ -4828,7 +4872,7 @@ export module '@theia/plugin' {
|
|
|
4828
4872
|
export function createStatusBarItem(id: string, alignment?: StatusBarAlignment, priority?: number): StatusBarItem;
|
|
4829
4873
|
|
|
4830
4874
|
/**
|
|
4831
|
-
* Create a new
|
|
4875
|
+
* Create a new {@link OutputChannel output channel} with the given name.
|
|
4832
4876
|
*
|
|
4833
4877
|
* @param name String which will be used to represent the channel in the UI.
|
|
4834
4878
|
*/
|
|
@@ -4848,7 +4892,7 @@ export module '@theia/plugin' {
|
|
|
4848
4892
|
export const onDidCloseTerminal: Event<Terminal>;
|
|
4849
4893
|
|
|
4850
4894
|
/**
|
|
4851
|
-
* An
|
|
4895
|
+
* An {@link Event event} which fires when a terminal has been created,
|
|
4852
4896
|
* either through the createTerminal API or commands.
|
|
4853
4897
|
*/
|
|
4854
4898
|
export const onDidOpenTerminal: Event<Terminal>;
|
|
@@ -4876,26 +4920,26 @@ export module '@theia/plugin' {
|
|
|
4876
4920
|
export function createTerminal(options: ExtensionTerminalOptions): Terminal;
|
|
4877
4921
|
|
|
4878
4922
|
/**
|
|
4879
|
-
* Register a
|
|
4880
|
-
* This will allow you to contribute data to the
|
|
4923
|
+
* Register a {@link TreeDataProvider TreeDataProvider} for the view contributed using the extension point `views`.
|
|
4924
|
+
* This will allow you to contribute data to the {@link TreeView TreeView} and update if the data changes.
|
|
4881
4925
|
*
|
|
4882
|
-
* **Note:** To get access to the
|
|
4926
|
+
* **Note:** To get access to the {@link TreeView TreeView} and perform operations on it, use {@link window.createTreeView createTreeView}.
|
|
4883
4927
|
*
|
|
4884
4928
|
* @param viewId Id of the view contributed using the extension point `views`.
|
|
4885
|
-
* @param treeDataProvider A
|
|
4929
|
+
* @param treeDataProvider A {@link TreeDataProvider TreeDataProvider} that provides tree data for the view
|
|
4886
4930
|
*/
|
|
4887
4931
|
export function registerTreeDataProvider<T>(viewId: string, treeDataProvider: TreeDataProvider<T>): Disposable;
|
|
4888
4932
|
|
|
4889
4933
|
/**
|
|
4890
|
-
* Create a
|
|
4934
|
+
* Create a {@link TreeView TreeView} for the view contributed using the extension point `views`.
|
|
4891
4935
|
* @param viewId Id of the view contributed using the extension point `views`.
|
|
4892
|
-
* @param options Options object to provide
|
|
4893
|
-
* @returns a
|
|
4936
|
+
* @param options Options object to provide {@link TreeDataProvider TreeDataProvider} for the view.
|
|
4937
|
+
* @returns a {@link TreeView TreeView}.
|
|
4894
4938
|
*/
|
|
4895
4939
|
export function createTreeView<T>(viewId: string, options: TreeViewOptions<T>): TreeView<T>;
|
|
4896
4940
|
|
|
4897
4941
|
/**
|
|
4898
|
-
* Registers a
|
|
4942
|
+
* Registers a {@link UriHandler uri handler} capable of handling system-wide {@link Uri uris}.
|
|
4899
4943
|
* In case there are multiple windows open, the topmost window will handle the uri.
|
|
4900
4944
|
* A uri handler is scoped to the extension it is contributed from; it will only
|
|
4901
4945
|
* be able to handle uris which are directed to the extension itself. A uri must respect
|
|
@@ -4923,7 +4967,7 @@ export module '@theia/plugin' {
|
|
|
4923
4967
|
* progress should show (and other details) is defined via the passed [`ProgressOptions`](#ProgressOptions).
|
|
4924
4968
|
*
|
|
4925
4969
|
* @param task A callback returning a promise. Progress state can be reported with
|
|
4926
|
-
* the provided
|
|
4970
|
+
* the provided {@link Progress progress}-object.
|
|
4927
4971
|
*
|
|
4928
4972
|
* To report discrete progress, use `increment` to indicate how much work has been completed. Each call with
|
|
4929
4973
|
* a `increment` value will be summed up and reflected as overall progress until 100% is reached (a value of
|
|
@@ -4939,13 +4983,13 @@ export module '@theia/plugin' {
|
|
|
4939
4983
|
export function withProgress<R>(options: ProgressOptions, task: (progress: Progress<{ message?: string; increment?: number }>, token: CancellationToken) => Thenable<R>): Thenable<R>;
|
|
4940
4984
|
|
|
4941
4985
|
/**
|
|
4942
|
-
* Creates a
|
|
4986
|
+
* Creates a {@link InputBox InputBox} to let the user enter some text input.
|
|
4943
4987
|
*
|
|
4944
4988
|
* Note that in many cases the more convenient [window.showInputBox](#window.showInputBox)
|
|
4945
4989
|
* is easier to use. [window.createInputBox](#window.createInputBox) should be used
|
|
4946
4990
|
* when [window.showInputBox](#window.showInputBox) does not offer the required flexibility.
|
|
4947
4991
|
*
|
|
4948
|
-
* @return A new
|
|
4992
|
+
* @return A new {@link InputBox InputBox}.
|
|
4949
4993
|
*/
|
|
4950
4994
|
export function createInputBox(): InputBox;
|
|
4951
4995
|
|
|
@@ -4959,8 +5003,8 @@ export module '@theia/plugin' {
|
|
|
4959
5003
|
/**
|
|
4960
5004
|
* Register a file decoration provider.
|
|
4961
5005
|
*
|
|
4962
|
-
* @param provider A
|
|
4963
|
-
* @return A
|
|
5006
|
+
* @param provider A {@link FileDecorationProvider FileDecorationProvider}.
|
|
5007
|
+
* @return A {@link Disposable disposable} that unregisters the provider.
|
|
4964
5008
|
*/
|
|
4965
5009
|
export function registerFileDecorationProvider(provider: FileDecorationProvider): Disposable;
|
|
4966
5010
|
|
|
@@ -4971,7 +5015,7 @@ export module '@theia/plugin' {
|
|
|
4971
5015
|
export let activeColorTheme: ColorTheme;
|
|
4972
5016
|
|
|
4973
5017
|
/**
|
|
4974
|
-
* An
|
|
5018
|
+
* An {@link Event event} which fires when the active color theme is changed or has changes.
|
|
4975
5019
|
*/
|
|
4976
5020
|
export const onDidChangeActiveColorTheme: Event<ColorTheme>;
|
|
4977
5021
|
}
|
|
@@ -4996,12 +5040,12 @@ export module '@theia/plugin' {
|
|
|
4996
5040
|
}
|
|
4997
5041
|
|
|
4998
5042
|
/**
|
|
4999
|
-
* Predefined buttons for
|
|
5043
|
+
* Predefined buttons for {@link QuickPick QuickPick} and {@link InputBox InputBox}.
|
|
5000
5044
|
*/
|
|
5001
5045
|
export class QuickInputButtons {
|
|
5002
5046
|
|
|
5003
5047
|
/**
|
|
5004
|
-
* A back button for
|
|
5048
|
+
* A back button for {@link QuickPick QuickPick} and {@link InputBox InputBox}.
|
|
5005
5049
|
*
|
|
5006
5050
|
* When a navigation 'back' button is needed this one should be used for consistency.
|
|
5007
5051
|
* It comes with a predefined icon, tooltip and location.
|
|
@@ -5015,7 +5059,7 @@ export module '@theia/plugin' {
|
|
|
5015
5059
|
}
|
|
5016
5060
|
|
|
5017
5061
|
/**
|
|
5018
|
-
* A concrete
|
|
5062
|
+
* A concrete {@link QuickInput QuickInput} to let the user input a text value.
|
|
5019
5063
|
*
|
|
5020
5064
|
* Note that in many cases the more convenient [window.showInputBox](#window.showInputBox)
|
|
5021
5065
|
* is easier to use. [window.createInputBox](#window.createInputBox) should be used
|
|
@@ -5051,7 +5095,7 @@ export module '@theia/plugin' {
|
|
|
5051
5095
|
/**
|
|
5052
5096
|
* Buttons for actions in the UI.
|
|
5053
5097
|
*/
|
|
5054
|
-
buttons:
|
|
5098
|
+
buttons: readonly QuickInputButton[];
|
|
5055
5099
|
|
|
5056
5100
|
/**
|
|
5057
5101
|
* An event signaling when a button was triggered.
|
|
@@ -5065,8 +5109,10 @@ export module '@theia/plugin' {
|
|
|
5065
5109
|
|
|
5066
5110
|
/**
|
|
5067
5111
|
* An optional validation message indicating a problem with the current input value.
|
|
5112
|
+
* By returning a string, the InputBox will use a default {@link InputBoxValidationSeverity} of Error.
|
|
5113
|
+
* Returning undefined clears the validation message.
|
|
5068
5114
|
*/
|
|
5069
|
-
validationMessage: string | undefined;
|
|
5115
|
+
validationMessage: string | InputBoxValidationMessage | undefined;
|
|
5070
5116
|
}
|
|
5071
5117
|
|
|
5072
5118
|
/**
|
|
@@ -5088,7 +5134,7 @@ export module '@theia/plugin' {
|
|
|
5088
5134
|
* [QuickInput.dispose](#QuickInput.dispose) it to allow for freeing up
|
|
5089
5135
|
* any resources associated with it.
|
|
5090
5136
|
*
|
|
5091
|
-
* See
|
|
5137
|
+
* See {@link QuickPick QuickPick} and {@link InputBox InputBox} for concrete UIs.
|
|
5092
5138
|
*/
|
|
5093
5139
|
export interface QuickInput {
|
|
5094
5140
|
|
|
@@ -5160,14 +5206,14 @@ export module '@theia/plugin' {
|
|
|
5160
5206
|
}
|
|
5161
5207
|
|
|
5162
5208
|
/**
|
|
5163
|
-
* Button for an action in a
|
|
5209
|
+
* Button for an action in a {@link QuickPick QuickPick} or {@link InputBox InputBox}.
|
|
5164
5210
|
*/
|
|
5165
5211
|
export interface QuickInputButton {
|
|
5166
5212
|
|
|
5167
5213
|
/**
|
|
5168
5214
|
* Icon for the button.
|
|
5169
5215
|
*/
|
|
5170
|
-
readonly iconPath: Uri | { light:
|
|
5216
|
+
readonly iconPath: Uri | { light: Uri; dark: Uri } | ThemeIcon;
|
|
5171
5217
|
|
|
5172
5218
|
/**
|
|
5173
5219
|
* An optional tooltip.
|
|
@@ -5227,7 +5273,7 @@ export module '@theia/plugin' {
|
|
|
5227
5273
|
}
|
|
5228
5274
|
|
|
5229
5275
|
/**
|
|
5230
|
-
* Options for creating a
|
|
5276
|
+
* Options for creating a {@link TreeView TreeView}
|
|
5231
5277
|
*/
|
|
5232
5278
|
export interface TreeViewOptions<T> {
|
|
5233
5279
|
|
|
@@ -5243,14 +5289,14 @@ export module '@theia/plugin' {
|
|
|
5243
5289
|
}
|
|
5244
5290
|
|
|
5245
5291
|
/**
|
|
5246
|
-
* The event that is fired when an element in the
|
|
5292
|
+
* The event that is fired when an element in the {@link TreeView TreeView} is expanded or collapsed
|
|
5247
5293
|
*/
|
|
5248
5294
|
export interface TreeViewExpansionEvent<T> {
|
|
5249
5295
|
|
|
5250
5296
|
/**
|
|
5251
5297
|
* Element that is expanded or collapsed.
|
|
5252
5298
|
*/
|
|
5253
|
-
element: T;
|
|
5299
|
+
readonly element: T;
|
|
5254
5300
|
|
|
5255
5301
|
}
|
|
5256
5302
|
|
|
@@ -5262,7 +5308,7 @@ export module '@theia/plugin' {
|
|
|
5262
5308
|
/**
|
|
5263
5309
|
* Selected elements.
|
|
5264
5310
|
*/
|
|
5265
|
-
readonly selection: T[];
|
|
5311
|
+
readonly selection: readonly T[];
|
|
5266
5312
|
|
|
5267
5313
|
}
|
|
5268
5314
|
|
|
@@ -5272,7 +5318,7 @@ export module '@theia/plugin' {
|
|
|
5272
5318
|
export interface TreeViewVisibilityChangeEvent {
|
|
5273
5319
|
|
|
5274
5320
|
/**
|
|
5275
|
-
* `true` if the
|
|
5321
|
+
* `true` if the {@link TreeView tree view} is visible otherwise `false`.
|
|
5276
5322
|
*/
|
|
5277
5323
|
readonly visible: boolean;
|
|
5278
5324
|
|
|
@@ -5296,20 +5342,20 @@ export module '@theia/plugin' {
|
|
|
5296
5342
|
/**
|
|
5297
5343
|
* Currently selected elements.
|
|
5298
5344
|
*/
|
|
5299
|
-
readonly selection:
|
|
5345
|
+
readonly selection: readonly T[];
|
|
5300
5346
|
|
|
5301
5347
|
/**
|
|
5302
|
-
* Event that is fired when the
|
|
5348
|
+
* Event that is fired when the {@link TreeView.selection selection} has changed
|
|
5303
5349
|
*/
|
|
5304
5350
|
readonly onDidChangeSelection: Event<TreeViewSelectionChangeEvent<T>>;
|
|
5305
5351
|
|
|
5306
5352
|
/**
|
|
5307
|
-
* `true` if the
|
|
5353
|
+
* `true` if the {@link TreeView tree view} is visible otherwise `false`.
|
|
5308
5354
|
*/
|
|
5309
5355
|
readonly visible: boolean;
|
|
5310
5356
|
|
|
5311
5357
|
/**
|
|
5312
|
-
* Event that is fired when
|
|
5358
|
+
* Event that is fired when {@link TreeView.visible visibility} has changed
|
|
5313
5359
|
*/
|
|
5314
5360
|
readonly onDidChangeVisibility: Event<TreeViewVisibilityChangeEvent>;
|
|
5315
5361
|
|
|
@@ -5336,9 +5382,9 @@ export module '@theia/plugin' {
|
|
|
5336
5382
|
*
|
|
5337
5383
|
* In order to not to select, set the option `select` to `false`.
|
|
5338
5384
|
*
|
|
5339
|
-
* **NOTE:**
|
|
5385
|
+
* **NOTE:** {@link TreeDataProvider TreeDataProvider} is required to implement {@link TreeDataProvider.getParent getParent} method to access this API.
|
|
5340
5386
|
*/
|
|
5341
|
-
reveal(element: T, options?: { select?: boolean
|
|
5387
|
+
reveal(element: T, options?: { select?: boolean; focus?: boolean; expand?: boolean | number }): Thenable<void>;
|
|
5342
5388
|
}
|
|
5343
5389
|
|
|
5344
5390
|
/**
|
|
@@ -5353,10 +5399,10 @@ export module '@theia/plugin' {
|
|
|
5353
5399
|
onDidChangeTreeData?: Event<T | undefined | null>;
|
|
5354
5400
|
|
|
5355
5401
|
/**
|
|
5356
|
-
* Get
|
|
5402
|
+
* Get {@link TreeItem TreeItem} representation of the `element`
|
|
5357
5403
|
*
|
|
5358
|
-
* @param element The element for which
|
|
5359
|
-
* @return
|
|
5404
|
+
* @param element The element for which {@link TreeItem TreeItem} representation is asked for.
|
|
5405
|
+
* @return {@link TreeItem TreeItem} representation of the element
|
|
5360
5406
|
*/
|
|
5361
5407
|
getTreeItem(element: T): TreeItem | Thenable<TreeItem>;
|
|
5362
5408
|
|
|
@@ -5372,7 +5418,7 @@ export module '@theia/plugin' {
|
|
|
5372
5418
|
* Optional method to return the parent of `element`.
|
|
5373
5419
|
* Return `null` or `undefined` if `element` is a child of root.
|
|
5374
5420
|
*
|
|
5375
|
-
* **NOTE:** This method should be implemented in order to access
|
|
5421
|
+
* **NOTE:** This method should be implemented in order to access {@link TreeView.reveal reveal} API.
|
|
5376
5422
|
*
|
|
5377
5423
|
* @param element The element for which the parent has to be returned.
|
|
5378
5424
|
* @return Parent of `element`.
|
|
@@ -5382,7 +5428,7 @@ export module '@theia/plugin' {
|
|
|
5382
5428
|
|
|
5383
5429
|
export class TreeItem {
|
|
5384
5430
|
/**
|
|
5385
|
-
* A human-readable string describing this item. When `falsy`, it is derived from
|
|
5431
|
+
* A human-readable string describing this item. When `falsy`, it is derived from {@link TreeItem.resourceUri resourceUri}.
|
|
5386
5432
|
*/
|
|
5387
5433
|
label?: string | TreeItemLabel;
|
|
5388
5434
|
|
|
@@ -5394,23 +5440,23 @@ export module '@theia/plugin' {
|
|
|
5394
5440
|
id?: string;
|
|
5395
5441
|
|
|
5396
5442
|
/**
|
|
5397
|
-
* The icon path or
|
|
5398
|
-
* When `falsy`,
|
|
5399
|
-
* When a
|
|
5443
|
+
* The icon path or {@link ThemeIcon ThemeIcon} for the tree item.
|
|
5444
|
+
* When `falsy`, {@link ThemeIcon.Folder Folder Theme Icon} is assigned, if item is collapsible otherwise {@link ThemeIcon.File File Theme Icon}.
|
|
5445
|
+
* When a {@link ThemeIcon ThemeIcon} is specified, icon is derived from the current file icon theme for the specified theme icon using {@link TreeItem.resourceUri resourceUri} (if provided).
|
|
5400
5446
|
*/
|
|
5401
5447
|
iconPath?: string | Uri | { light: string | Uri; dark: string | Uri } | ThemeIcon;
|
|
5402
5448
|
|
|
5403
5449
|
/**
|
|
5404
5450
|
* A human readable string which is rendered less prominent.
|
|
5405
|
-
* When `true`, it is derived from
|
|
5451
|
+
* When `true`, it is derived from {@link TreeItem.resourceUri resourceUri} and when `falsy`, it is not shown.
|
|
5406
5452
|
*/
|
|
5407
5453
|
description?: string | boolean;
|
|
5408
5454
|
|
|
5409
5455
|
/**
|
|
5410
|
-
* The
|
|
5456
|
+
* The {@link Uri uri} of the resource representing this item.
|
|
5411
5457
|
*
|
|
5412
|
-
* Will be used to derive the
|
|
5413
|
-
* Will be used to derive the icon from current icon theme, when
|
|
5458
|
+
* Will be used to derive the {@link TreeItem.label label}, when it is not provided.
|
|
5459
|
+
* Will be used to derive the icon from current icon theme, when {@link TreeItem.iconPath iconPath} has {@link ThemeIcon ThemeIcon} value.
|
|
5414
5460
|
*/
|
|
5415
5461
|
resourceUri?: Uri;
|
|
5416
5462
|
|
|
@@ -5420,12 +5466,12 @@ export module '@theia/plugin' {
|
|
|
5420
5466
|
tooltip?: string | undefined;
|
|
5421
5467
|
|
|
5422
5468
|
/**
|
|
5423
|
-
* The
|
|
5469
|
+
* The {@link Command command} which should be run when the tree item is selected.
|
|
5424
5470
|
*/
|
|
5425
5471
|
command?: Command;
|
|
5426
5472
|
|
|
5427
5473
|
/**
|
|
5428
|
-
*
|
|
5474
|
+
* {@link TreeItemCollapsibleState TreeItemCollapsibleState} of the tree item.
|
|
5429
5475
|
*/
|
|
5430
5476
|
collapsibleState?: TreeItemCollapsibleState;
|
|
5431
5477
|
|
|
@@ -5458,13 +5504,13 @@ export module '@theia/plugin' {
|
|
|
5458
5504
|
|
|
5459
5505
|
/**
|
|
5460
5506
|
* @param label A human-readable string describing this item
|
|
5461
|
-
* @param collapsibleState
|
|
5507
|
+
* @param collapsibleState {@link TreeItemCollapsibleState TreeItemCollapsibleState} of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None)
|
|
5462
5508
|
*/
|
|
5463
5509
|
constructor(label: string | TreeItemLabel, collapsibleState?: TreeItemCollapsibleState);
|
|
5464
5510
|
|
|
5465
5511
|
/**
|
|
5466
|
-
* @param resourceUri The
|
|
5467
|
-
* @param collapsibleState
|
|
5512
|
+
* @param resourceUri The {@link Uri uri} of the resource representing this item.
|
|
5513
|
+
* @param collapsibleState {@link TreeItemCollapsibleState TreeItemCollapsibleState} of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None)
|
|
5468
5514
|
*/
|
|
5469
5515
|
constructor(resourceUri: Uri, collapsibleState?: TreeItemCollapsibleState);
|
|
5470
5516
|
}
|
|
@@ -5516,7 +5562,7 @@ export module '@theia/plugin' {
|
|
|
5516
5562
|
*
|
|
5517
5563
|
* *Workspace configuration* comes from Workspace Settings and shadows Global configuration.
|
|
5518
5564
|
*
|
|
5519
|
-
* *Workspace Folder configuration* comes from `.vscode` folder under one of the
|
|
5565
|
+
* *Workspace Folder configuration* comes from `.vscode` folder under one of the {@link workspace.workspaceFolders workspace folders}.
|
|
5520
5566
|
*
|
|
5521
5567
|
* *Note:* Workspace and Workspace Folder configurations contains `launch` and `tasks` settings. Their basename will be
|
|
5522
5568
|
* part of the section identifier. The following snippets shows how to retrieve all configurations
|
|
@@ -5583,15 +5629,15 @@ export module '@theia/plugin' {
|
|
|
5583
5629
|
*
|
|
5584
5630
|
* A value can be changed in
|
|
5585
5631
|
*
|
|
5586
|
-
* -
|
|
5587
|
-
* -
|
|
5588
|
-
* -
|
|
5589
|
-
*
|
|
5632
|
+
* - {@link ConfigurationTarget.Global Global configuration}: Changes the value for all instances of the editor.
|
|
5633
|
+
* - {@link ConfigurationTarget.Workspace Workspace configuration}: Changes the value for current workspace, if available.
|
|
5634
|
+
* - {@link ConfigurationTarget.WorkspaceFolder Workspace folder configuration}: Changes the value for the
|
|
5635
|
+
* {@link workspace.workspaceFolders Workspace folder} to which the current {@link WorkspaceConfiguration configuration} is scoped to.
|
|
5590
5636
|
*
|
|
5591
5637
|
* *Note 1:* Setting a global value in the presence of a more specific workspace value
|
|
5592
5638
|
* has no observable effect in that workspace, but in others. Setting a workspace value
|
|
5593
5639
|
* in the presence of a more specific folder value has no observable effect for the resources
|
|
5594
|
-
* under respective
|
|
5640
|
+
* under respective {@link workspace.workspaceFolders folder}, but in others. Refer to
|
|
5595
5641
|
* [Settings Inheritence](https://code.visualstudio.com/docs/getstarted/settings) for more information.
|
|
5596
5642
|
*
|
|
5597
5643
|
* *Note 2:* To remove a configuration value use `undefined`, like so: `config.update('somekey', undefined)`
|
|
@@ -5605,7 +5651,7 @@ export module '@theia/plugin' {
|
|
|
5605
5651
|
*
|
|
5606
5652
|
* @param section Configuration name, supports _dotted_ names.
|
|
5607
5653
|
* @param value The new value.
|
|
5608
|
-
* @param configurationTarget The
|
|
5654
|
+
* @param configurationTarget The {@link ConfigurationTarget configuration target} or a boolean value.
|
|
5609
5655
|
* - If `true` configuration target is `ConfigurationTarget.Global`.
|
|
5610
5656
|
* - If `false` configuration target is `ConfigurationTarget.Workspace`.
|
|
5611
5657
|
* - If `undefined` or `null` configuration target is
|
|
@@ -5656,18 +5702,18 @@ export module '@theia/plugin' {
|
|
|
5656
5702
|
export type ConfigurationScope = Uri | WorkspaceFolder | TextDocument | { uri?: Uri, languageId: string };
|
|
5657
5703
|
|
|
5658
5704
|
/**
|
|
5659
|
-
* An event describing a change to the set of
|
|
5705
|
+
* An event describing a change to the set of {@link workspace.workspaceFolders workspace folders}.
|
|
5660
5706
|
*/
|
|
5661
5707
|
export interface WorkspaceFoldersChangeEvent {
|
|
5662
5708
|
/**
|
|
5663
5709
|
* Added workspace folders.
|
|
5664
5710
|
*/
|
|
5665
|
-
readonly added: WorkspaceFolder[];
|
|
5711
|
+
readonly added: readonly WorkspaceFolder[];
|
|
5666
5712
|
|
|
5667
5713
|
/**
|
|
5668
5714
|
* Removed workspace folders.
|
|
5669
5715
|
*/
|
|
5670
|
-
readonly removed: WorkspaceFolder[];
|
|
5716
|
+
readonly removed: readonly WorkspaceFolder[];
|
|
5671
5717
|
}
|
|
5672
5718
|
|
|
5673
5719
|
/**
|
|
@@ -5678,7 +5724,7 @@ export module '@theia/plugin' {
|
|
|
5678
5724
|
/**
|
|
5679
5725
|
* The associated uri for this workspace folder.
|
|
5680
5726
|
*
|
|
5681
|
-
* *Note:* The
|
|
5727
|
+
* *Note:* The {@link Uri Uri}-type was intentionally chosen such that future releases of the editor can support
|
|
5682
5728
|
* workspace folders that are not stored on the local disk, e.g. `ftp://server/workspaces/foo`.
|
|
5683
5729
|
*/
|
|
5684
5730
|
readonly uri: Uri;
|
|
@@ -5856,22 +5902,22 @@ export module '@theia/plugin' {
|
|
|
5856
5902
|
* and to manage files and folders. It allows extensions to serve files from remote places,
|
|
5857
5903
|
* like ftp-servers, and to seamlessly integrate those into the editor.
|
|
5858
5904
|
*
|
|
5859
|
-
* * *Note 1:* The filesystem provider API works with
|
|
5905
|
+
* * *Note 1:* The filesystem provider API works with {@link Uri uris} and assumes hierarchical
|
|
5860
5906
|
* paths, e.g. `foo:/my/path` is a child of `foo:/my/` and a parent of `foo:/my/path/deeper`.
|
|
5861
5907
|
* * *Note 2:* There is an activation event `onFileSystem:<scheme>` that fires when a file
|
|
5862
5908
|
* or folder is being accessed.
|
|
5863
|
-
* * *Note 3:* The word 'file' is often used to denote all
|
|
5909
|
+
* * *Note 3:* The word 'file' is often used to denote all {@link FileType kinds} of files, e.g.
|
|
5864
5910
|
* folders, symbolic links, and regular files.
|
|
5865
5911
|
*/
|
|
5866
5912
|
export interface FileSystemProvider {
|
|
5867
5913
|
|
|
5868
5914
|
/**
|
|
5869
5915
|
* An event to signal that a resource has been created, changed, or deleted. This
|
|
5870
|
-
* event should fire for resources that are being
|
|
5916
|
+
* event should fire for resources that are being {@link FileSystemProvider.watch watched}
|
|
5871
5917
|
* by clients of this provider.
|
|
5872
5918
|
*
|
|
5873
5919
|
* *Note:* It is important that the metadata of the file that changed provides an
|
|
5874
|
-
* updated `mtime` that advanced from the previous value in the
|
|
5920
|
+
* updated `mtime` that advanced from the previous value in the {@link FileStat stat} and a
|
|
5875
5921
|
* correct `size` value. Otherwise there may be optimizations in place that will not show
|
|
5876
5922
|
* the change in an editor for example.
|
|
5877
5923
|
*/
|
|
@@ -5894,23 +5940,23 @@ export module '@theia/plugin' {
|
|
|
5894
5940
|
* Retrieve metadata about a file.
|
|
5895
5941
|
*
|
|
5896
5942
|
* Note that the metadata for symbolic links should be the metadata of the file they refer to.
|
|
5897
|
-
* Still, the
|
|
5943
|
+
* Still, the {@link FileType.SymbolicLink SymbolicLink}-type must be used in addition to the actual type, e.g.
|
|
5898
5944
|
* `FileType.SymbolicLink | FileType.Directory`.
|
|
5899
5945
|
*
|
|
5900
5946
|
* @param uri The uri of the file to retrieve metadata about.
|
|
5901
5947
|
* @return The file metadata about the file.
|
|
5902
5948
|
* @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `uri` doesn't exist.
|
|
5903
5949
|
*/
|
|
5904
|
-
stat(uri: Uri): FileStat |
|
|
5950
|
+
stat(uri: Uri): FileStat | Thenable<FileStat>;
|
|
5905
5951
|
|
|
5906
5952
|
/**
|
|
5907
|
-
* Retrieve all entries of a
|
|
5953
|
+
* Retrieve all entries of a {@link FileType.Directory directory}.
|
|
5908
5954
|
*
|
|
5909
5955
|
* @param uri The uri of the folder.
|
|
5910
5956
|
* @return An array of name/type-tuples or a thenable that resolves to such.
|
|
5911
5957
|
* @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `uri` doesn't exist.
|
|
5912
5958
|
*/
|
|
5913
|
-
readDirectory(uri: Uri): [string, FileType][] |
|
|
5959
|
+
readDirectory(uri: Uri): [string, FileType][] | Thenable<[string, FileType][]>;
|
|
5914
5960
|
|
|
5915
5961
|
/**
|
|
5916
5962
|
* Create a new directory (Note, that new files are created via `write`-calls).
|
|
@@ -5920,7 +5966,7 @@ export module '@theia/plugin' {
|
|
|
5920
5966
|
* @throws [`FileExists`](#FileSystemError.FileExists) when `uri` already exists.
|
|
5921
5967
|
* @throws [`NoPermissions`](#FileSystemError.NoPermissions) when permissions aren't sufficient.
|
|
5922
5968
|
*/
|
|
5923
|
-
createDirectory(uri: Uri): void |
|
|
5969
|
+
createDirectory(uri: Uri): void | Thenable<void>;
|
|
5924
5970
|
|
|
5925
5971
|
/**
|
|
5926
5972
|
* Read the entire contents of a file.
|
|
@@ -5929,7 +5975,7 @@ export module '@theia/plugin' {
|
|
|
5929
5975
|
* @return An array of bytes or a thenable that resolves to such.
|
|
5930
5976
|
* @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `uri` doesn't exist.
|
|
5931
5977
|
*/
|
|
5932
|
-
readFile(uri: Uri): Uint8Array |
|
|
5978
|
+
readFile(uri: Uri): Uint8Array | Thenable<Uint8Array>;
|
|
5933
5979
|
|
|
5934
5980
|
/**
|
|
5935
5981
|
* Write data to a file, replacing its entire contents.
|
|
@@ -5942,7 +5988,7 @@ export module '@theia/plugin' {
|
|
|
5942
5988
|
* @throws [`FileExists`](#FileSystemError.FileExists) when `uri` already exists, `create` is set but `overwrite` is not set.
|
|
5943
5989
|
* @throws [`NoPermissions`](#FileSystemError.NoPermissions) when permissions aren't sufficient.
|
|
5944
5990
|
*/
|
|
5945
|
-
writeFile(uri: Uri, content: Uint8Array, options: { create: boolean, overwrite: boolean }): void |
|
|
5991
|
+
writeFile(uri: Uri, content: Uint8Array, options: { create: boolean, overwrite: boolean }): void | Thenable<void>;
|
|
5946
5992
|
|
|
5947
5993
|
/**
|
|
5948
5994
|
* Delete a file.
|
|
@@ -5952,7 +5998,7 @@ export module '@theia/plugin' {
|
|
|
5952
5998
|
* @throws [`FileNotFound`](#FileSystemError.FileNotFound) when `uri` doesn't exist.
|
|
5953
5999
|
* @throws [`NoPermissions`](#FileSystemError.NoPermissions) when permissions aren't sufficient.
|
|
5954
6000
|
*/
|
|
5955
|
-
delete(uri: Uri, options: { recursive: boolean }): void |
|
|
6001
|
+
delete(uri: Uri, options: { recursive: boolean }): void | Thenable<void>;
|
|
5956
6002
|
|
|
5957
6003
|
/**
|
|
5958
6004
|
* Rename a file or folder.
|
|
@@ -5965,7 +6011,7 @@ export module '@theia/plugin' {
|
|
|
5965
6011
|
* @throws [`FileExists`](#FileSystemError.FileExists) when `newUri` exists and when the `overwrite` option is not `true`.
|
|
5966
6012
|
* @throws [`NoPermissions`](#FileSystemError.NoPermissions) when permissions aren't sufficient.
|
|
5967
6013
|
*/
|
|
5968
|
-
rename(oldUri: Uri, newUri: Uri, options: { overwrite: boolean }): void |
|
|
6014
|
+
rename(oldUri: Uri, newUri: Uri, options: { overwrite: boolean }): void | Thenable<void>;
|
|
5969
6015
|
|
|
5970
6016
|
/**
|
|
5971
6017
|
* Copy files or folders. Implementing this function is optional but it will speedup
|
|
@@ -5979,12 +6025,12 @@ export module '@theia/plugin' {
|
|
|
5979
6025
|
* @throws [`FileExists`](#FileSystemError.FileExists) when `destination` exists and when the `overwrite` option is not `true`.
|
|
5980
6026
|
* @throws [`NoPermissions`](#FileSystemError.NoPermissions) when permissions aren't sufficient.
|
|
5981
6027
|
*/
|
|
5982
|
-
copy?(source: Uri, destination: Uri, options: { overwrite: boolean }): void |
|
|
6028
|
+
copy?(source: Uri, destination: Uri, options: { overwrite: boolean }): void | Thenable<void>;
|
|
5983
6029
|
}
|
|
5984
6030
|
|
|
5985
6031
|
/**
|
|
5986
6032
|
* The file system interface exposes the editor's built-in and contributed
|
|
5987
|
-
*
|
|
6033
|
+
* {@link FileSystemProvider file system providers}. It allows extensions to work
|
|
5988
6034
|
* with files from the local disk as well as files from remote places, like the
|
|
5989
6035
|
* remote extension host or ftp-servers.
|
|
5990
6036
|
*
|
|
@@ -6001,7 +6047,7 @@ export module '@theia/plugin' {
|
|
|
6001
6047
|
stat(uri: Uri): Thenable<FileStat>;
|
|
6002
6048
|
|
|
6003
6049
|
/**
|
|
6004
|
-
* Retrieve all entries of a
|
|
6050
|
+
* Retrieve all entries of a {@link FileType.Directory directory}.
|
|
6005
6051
|
*
|
|
6006
6052
|
* @param uri The uri of the folder.
|
|
6007
6053
|
* @return An array of name/type-tuples or a thenable that resolves to such.
|
|
@@ -6066,14 +6112,14 @@ export module '@theia/plugin' {
|
|
|
6066
6112
|
* of the folder that has been opened. There is no workspace when just a file but not a
|
|
6067
6113
|
* folder has been opened.
|
|
6068
6114
|
*
|
|
6069
|
-
* The workspace offers support for
|
|
6070
|
-
* events and for
|
|
6115
|
+
* The workspace offers support for {@link workspace.createFileSystemWatcher listening} to fs
|
|
6116
|
+
* events and for {@link workspace.findFiles finding} files. Both perform well and run _outside_
|
|
6071
6117
|
* the editor-process so that they should be always used instead of nodejs-equivalents.
|
|
6072
6118
|
*/
|
|
6073
6119
|
export namespace workspace {
|
|
6074
6120
|
|
|
6075
6121
|
/**
|
|
6076
|
-
* A
|
|
6122
|
+
* A {@link FileSystem file system} instance that allows to interact with local and remote
|
|
6077
6123
|
* files, e.g. `workspace.fs.readDirectory(someUri)` allows to retrieve all entries
|
|
6078
6124
|
* of a directory or `workspace.fs.stat(anotherUri)` returns the meta data for a
|
|
6079
6125
|
* file.
|
|
@@ -6088,7 +6134,7 @@ export module '@theia/plugin' {
|
|
|
6088
6134
|
*
|
|
6089
6135
|
* @readonly
|
|
6090
6136
|
*/
|
|
6091
|
-
export
|
|
6137
|
+
export const rootPath: string | undefined;
|
|
6092
6138
|
|
|
6093
6139
|
/**
|
|
6094
6140
|
* List of workspace folders or `undefined` when no folder is open.
|
|
@@ -6096,7 +6142,7 @@ export module '@theia/plugin' {
|
|
|
6096
6142
|
*
|
|
6097
6143
|
* @readonly
|
|
6098
6144
|
*/
|
|
6099
|
-
export
|
|
6145
|
+
export const workspaceFolders: readonly WorkspaceFolder[] | undefined;
|
|
6100
6146
|
|
|
6101
6147
|
/**
|
|
6102
6148
|
* The location of the workspace file, for example:
|
|
@@ -6132,7 +6178,7 @@ export module '@theia/plugin' {
|
|
|
6132
6178
|
*
|
|
6133
6179
|
* @readonly
|
|
6134
6180
|
*/
|
|
6135
|
-
export let textDocuments: TextDocument[];
|
|
6181
|
+
export let textDocuments: readonly TextDocument[];
|
|
6136
6182
|
|
|
6137
6183
|
/**
|
|
6138
6184
|
* Register a text document content provider.
|
|
@@ -6141,46 +6187,46 @@ export module '@theia/plugin' {
|
|
|
6141
6187
|
*
|
|
6142
6188
|
* @param scheme The uri-scheme to register for.
|
|
6143
6189
|
* @param provider A content provider.
|
|
6144
|
-
* @return A
|
|
6190
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
6145
6191
|
*/
|
|
6146
6192
|
export function registerTextDocumentContentProvider(scheme: string, provider: TextDocumentContentProvider): Disposable;
|
|
6147
6193
|
|
|
6148
6194
|
/**
|
|
6149
|
-
* An event that is emitted when a
|
|
6195
|
+
* An event that is emitted when a {@link TextDocument text document} is opened.
|
|
6150
6196
|
*
|
|
6151
|
-
* To add an event listener when a visible text document is opened, use the
|
|
6152
|
-
*
|
|
6197
|
+
* To add an event listener when a visible text document is opened, use the {@link TextEditor TextEditor} events in the
|
|
6198
|
+
* {@link window window} namespace. Note that:
|
|
6153
6199
|
*
|
|
6154
|
-
* - The event is emitted before the
|
|
6155
|
-
*
|
|
6156
|
-
* - When a
|
|
6200
|
+
* - The event is emitted before the {@link TextDocument document} is updated in the
|
|
6201
|
+
* {@link window.activeTextEditor active text editor}
|
|
6202
|
+
* - When a {@link TextDocument text document} is already open (e.g.: open in another {@link window.visibleTextEditors visible text editor}) this event is not emitted
|
|
6157
6203
|
*
|
|
6158
6204
|
*/
|
|
6159
6205
|
export const onDidOpenTextDocument: Event<TextDocument>;
|
|
6160
6206
|
|
|
6161
6207
|
/**
|
|
6162
|
-
* An event that is emitted when a
|
|
6208
|
+
* An event that is emitted when a {@link TextDocument text document} is disposed.
|
|
6163
6209
|
*
|
|
6164
|
-
* To add an event listener when a visible text document is closed, use the
|
|
6165
|
-
*
|
|
6166
|
-
* but the document remains open in another
|
|
6210
|
+
* To add an event listener when a visible text document is closed, use the {@link TextEditor TextEditor} events in the
|
|
6211
|
+
* {@link window window} namespace. Note that this event is not emitted when a {@link TextEditor TextEditor} is closed
|
|
6212
|
+
* but the document remains open in another {@link window.visibleTextEditors visible text editor}.
|
|
6167
6213
|
*/
|
|
6168
6214
|
export const onDidCloseTextDocument: Event<TextDocument>;
|
|
6169
6215
|
|
|
6170
6216
|
/**
|
|
6171
|
-
* An event that is emitted when a
|
|
6172
|
-
* when the
|
|
6173
|
-
*
|
|
6217
|
+
* An event that is emitted when a {@link TextDocument text document} is changed. This usually happens
|
|
6218
|
+
* when the {@link TextDocument.getText contents} changes but also when other things like the
|
|
6219
|
+
* {@link TextDocument.isDirty dirty}-state changes.
|
|
6174
6220
|
*/
|
|
6175
6221
|
export const onDidChangeTextDocument: Event<TextDocumentChangeEvent>;
|
|
6176
6222
|
|
|
6177
6223
|
/**
|
|
6178
|
-
* An event that is emitted when a
|
|
6224
|
+
* An event that is emitted when a {@link TextDocument text document} will be saved to disk.
|
|
6179
6225
|
*
|
|
6180
6226
|
* *Note 1:* Subscribers can delay saving by registering asynchronous work. For the sake of data integrity the editor
|
|
6181
6227
|
* might save without firing this event. For instance when shutting down with dirty files.
|
|
6182
6228
|
*
|
|
6183
|
-
* *Note 2:* Subscribers are called sequentially and they can
|
|
6229
|
+
* *Note 2:* Subscribers are called sequentially and they can {@link TextDocumentWillSaveEvent.waitUntil delay} saving
|
|
6184
6230
|
* by registering asynchronous work. Protection against misbehaving listeners is implemented as such:
|
|
6185
6231
|
* * there is an overall time budget that all listeners share and if that is exhausted no further listener is called
|
|
6186
6232
|
* * listeners that take a long time or produce errors frequently will not be called anymore
|
|
@@ -6190,7 +6236,7 @@ export module '@theia/plugin' {
|
|
|
6190
6236
|
export const onWillSaveTextDocument: Event<TextDocumentWillSaveEvent>;
|
|
6191
6237
|
|
|
6192
6238
|
/**
|
|
6193
|
-
* An event that is emitted when a
|
|
6239
|
+
* An event that is emitted when a {@link TextDocument text document} is saved to disk.
|
|
6194
6240
|
*/
|
|
6195
6241
|
export const onDidSaveTextDocument: Event<TextDocument>;
|
|
6196
6242
|
|
|
@@ -6266,29 +6312,29 @@ export module '@theia/plugin' {
|
|
|
6266
6312
|
|
|
6267
6313
|
/**
|
|
6268
6314
|
* Opens a document. Will return early if this document is already open. Otherwise
|
|
6269
|
-
* the document is loaded and the
|
|
6315
|
+
* the document is loaded and the {@link workspace.onDidOpenTextDocument didOpen}-event fires.
|
|
6270
6316
|
*
|
|
6271
|
-
* The document is denoted by an
|
|
6317
|
+
* The document is denoted by an {@link Uri uri}. Depending on the {@link Uri.scheme scheme} the
|
|
6272
6318
|
* following rules apply:
|
|
6273
6319
|
* * `file`-scheme: Open a file on disk, will be rejected if the file does not exist or cannot be loaded.
|
|
6274
6320
|
* * `untitled`-scheme: A new file that should be saved on disk, e.g. `untitled:c:\frodo\new.js`. The language
|
|
6275
6321
|
* will be derived from the file name.
|
|
6276
|
-
* * For all other schemes the registered text document content
|
|
6322
|
+
* * For all other schemes the registered text document content {@link TextDocumentContentProvider providers} are consulted.
|
|
6277
6323
|
*
|
|
6278
6324
|
* *Note* that the lifecycle of the returned document is owned by the editor and not by the extension. That means an
|
|
6279
6325
|
* [`onDidClose`](#workspace.onDidCloseTextDocument)-event can occur at any time after opening it.
|
|
6280
6326
|
*
|
|
6281
6327
|
* @param uri Identifies the resource to open.
|
|
6282
|
-
* @return A promise that resolves to a
|
|
6328
|
+
* @return A promise that resolves to a {@link TextDocument document}.
|
|
6283
6329
|
*/
|
|
6284
6330
|
export function openTextDocument(uri: Uri): Thenable<TextDocument | undefined>;
|
|
6285
6331
|
|
|
6286
6332
|
/**
|
|
6287
6333
|
* A short-hand for `openTextDocument(Uri.file(fileName))`.
|
|
6288
6334
|
*
|
|
6289
|
-
* @see
|
|
6335
|
+
* @see {@link openTextDocument openTextDocument}
|
|
6290
6336
|
* @param fileName A name of a file on disk.
|
|
6291
|
-
* @return A promise that resolves to a
|
|
6337
|
+
* @return A promise that resolves to a {@link TextDocument document}.
|
|
6292
6338
|
*/
|
|
6293
6339
|
export function openTextDocument(fileName: string): Thenable<TextDocument | undefined>;
|
|
6294
6340
|
|
|
@@ -6298,7 +6344,7 @@ export module '@theia/plugin' {
|
|
|
6298
6344
|
* specify the *language* and/or the *content* of the document.
|
|
6299
6345
|
*
|
|
6300
6346
|
* @param options Options to control how the document will be created.
|
|
6301
|
-
* @return A promise that resolves to a
|
|
6347
|
+
* @return A promise that resolves to a {@link TextDocument document}.
|
|
6302
6348
|
*/
|
|
6303
6349
|
export function openTextDocument(options?: { language?: string; content?: string; }): Thenable<TextDocument | undefined>;
|
|
6304
6350
|
|
|
@@ -6318,7 +6364,7 @@ export module '@theia/plugin' {
|
|
|
6318
6364
|
export function getConfiguration(section?: string, scope?: ConfigurationScope | null): WorkspaceConfiguration;
|
|
6319
6365
|
|
|
6320
6366
|
/**
|
|
6321
|
-
* An event that is emitted when the
|
|
6367
|
+
* An event that is emitted when the {@link WorkspaceConfiguration configuration} changed.
|
|
6322
6368
|
*/
|
|
6323
6369
|
export const onDidChangeConfiguration: Event<ConfigurationChangeEvent>;
|
|
6324
6370
|
|
|
@@ -6328,10 +6374,10 @@ export module '@theia/plugin' {
|
|
|
6328
6374
|
* A glob pattern that filters the file events on their absolute path must be provided. Optionally,
|
|
6329
6375
|
* flags to ignore certain kinds of events can be provided. To stop listening to events the watcher must be disposed.
|
|
6330
6376
|
*
|
|
6331
|
-
* *Note* that only files within the current
|
|
6377
|
+
* *Note* that only files within the current {@link workspace.workspaceFolders workspace folders} can be watched.
|
|
6332
6378
|
*
|
|
6333
|
-
* @param globPattern A
|
|
6334
|
-
* and deleted files. Use a
|
|
6379
|
+
* @param globPattern A {@link GlobPattern glob pattern} that is applied to the absolute paths of created, changed,
|
|
6380
|
+
* and deleted files. Use a {@link RelativePattern relative pattern} to limit events to a certain {@link WorkspaceFolder workspace folder}.
|
|
6335
6381
|
* @param ignoreCreateEvents Ignore when files have been created.
|
|
6336
6382
|
* @param ignoreChangeEvents Ignore when files have been changed.
|
|
6337
6383
|
* @param ignoreDeleteEvents Ignore when files have been deleted.
|
|
@@ -6345,32 +6391,22 @@ export module '@theia/plugin' {
|
|
|
6345
6391
|
): FileSystemWatcher;
|
|
6346
6392
|
|
|
6347
6393
|
/**
|
|
6348
|
-
* Find files across all
|
|
6394
|
+
* Find files across all {@link workspace.workspaceFolders workspace folders} in the workspace.
|
|
6349
6395
|
*
|
|
6350
6396
|
* @sample `findFiles('**/*.js', '**/node_modules/**', 10)`
|
|
6351
|
-
* @param include A
|
|
6352
|
-
* will be matched against the file paths of resulting matches relative to their workspace. Use a
|
|
6353
|
-
* to restrict the search results to a
|
|
6354
|
-
* @param exclude A
|
|
6397
|
+
* @param include A {@link GlobPattern glob pattern} that defines the files to search for. The glob pattern
|
|
6398
|
+
* will be matched against the file paths of resulting matches relative to their workspace. Use a {@link RelativePattern relative pattern}
|
|
6399
|
+
* to restrict the search results to a {@link WorkspaceFolder workspace folder}.
|
|
6400
|
+
* @param exclude A {@link GlobPattern glob pattern} that defines files and folders to exclude. The glob pattern
|
|
6355
6401
|
* will be matched against the file paths of resulting matches relative to their workspace. When `undefined` only default excludes will
|
|
6356
6402
|
* apply, when `null` no excludes will apply.
|
|
6357
6403
|
* @param maxResults An upper-bound for the result.
|
|
6358
6404
|
* @param token A token that can be used to signal cancellation to the underlying search engine.
|
|
6359
6405
|
* @return A thenable that resolves to an array of resource identifiers. Will return no results if no
|
|
6360
|
-
*
|
|
6406
|
+
* {@link workspace.workspaceFolders workspace folders} are opened.
|
|
6361
6407
|
*/
|
|
6362
6408
|
export function findFiles(include: GlobPattern, exclude?: GlobPattern | null, maxResults?: number, token?: CancellationToken): Thenable<Uri[]>;
|
|
6363
6409
|
|
|
6364
|
-
/**
|
|
6365
|
-
* Find text in files across all [workspace folders] in the workspace
|
|
6366
|
-
* @param query What to search
|
|
6367
|
-
* @param optionsOrCallback
|
|
6368
|
-
* @param callbackOrToken
|
|
6369
|
-
* @param token
|
|
6370
|
-
*/
|
|
6371
|
-
export function findTextInFiles(query: TextSearchQuery, optionsOrCallback: FindTextInFilesOptions | ((result: TextSearchResult) => void),
|
|
6372
|
-
callbackOrToken?: CancellationToken | ((result: TextSearchResult) => void), token?: CancellationToken): Promise<TextSearchComplete>;
|
|
6373
|
-
|
|
6374
6410
|
/**
|
|
6375
6411
|
* Save all dirty files.
|
|
6376
6412
|
*
|
|
@@ -6381,7 +6417,7 @@ export module '@theia/plugin' {
|
|
|
6381
6417
|
|
|
6382
6418
|
/**
|
|
6383
6419
|
* Make changes to one or many resources or create, delete, and rename resources as defined by the given
|
|
6384
|
-
*
|
|
6420
|
+
* {@link WorkspaceEdit workspace edit}.
|
|
6385
6421
|
*
|
|
6386
6422
|
* All changes of a workspace edit are applied in the same order in which they have been added. If
|
|
6387
6423
|
* multiple textual inserts are made at the same position, these strings appear in the resulting text
|
|
@@ -6403,15 +6439,15 @@ export module '@theia/plugin' {
|
|
|
6403
6439
|
* There can only be one provider per scheme and an error is being thrown when a scheme
|
|
6404
6440
|
* has been claimed by another provider or when it is reserved.
|
|
6405
6441
|
*
|
|
6406
|
-
* @param scheme The uri-
|
|
6442
|
+
* @param scheme The uri-{@link Uri.scheme scheme} the provider registers for.
|
|
6407
6443
|
* @param provider The filesystem provider.
|
|
6408
6444
|
* @param options Immutable metadata about the provider.
|
|
6409
|
-
* @return A
|
|
6445
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
6410
6446
|
*/
|
|
6411
6447
|
export function registerFileSystemProvider(scheme: string, provider: FileSystemProvider, options?: { readonly isCaseSensitive?: boolean, readonly isReadonly?: boolean }): Disposable;
|
|
6412
6448
|
|
|
6413
6449
|
/**
|
|
6414
|
-
* Returns the
|
|
6450
|
+
* Returns the {@link WorkspaceFolder workspace folder} that contains a given uri.
|
|
6415
6451
|
* * returns `undefined` when the given uri doesn't match any workspace folder
|
|
6416
6452
|
*
|
|
6417
6453
|
* @param uri An uri.
|
|
@@ -6422,10 +6458,10 @@ export module '@theia/plugin' {
|
|
|
6422
6458
|
/**
|
|
6423
6459
|
* Returns a path that is relative to the workspace folder or folders.
|
|
6424
6460
|
*
|
|
6425
|
-
* When there are no
|
|
6461
|
+
* When there are no {@link workspace.workspaceFolders workspace folders} or when the path
|
|
6426
6462
|
* is not contained in them, the input is returned.
|
|
6427
6463
|
*
|
|
6428
|
-
* @param pathOrUri A path or uri. When a uri is given its
|
|
6464
|
+
* @param pathOrUri A path or uri. When a uri is given its {@link Uri.fsPath fsPath} is used.
|
|
6429
6465
|
* @param includeWorkspaceFolder When `true` and when the given path is contained inside a
|
|
6430
6466
|
* workspace folder the name of the workspace is prepended. Defaults to `true` when there are
|
|
6431
6467
|
* multiple workspace folders and `false` otherwise.
|
|
@@ -6434,7 +6470,7 @@ export module '@theia/plugin' {
|
|
|
6434
6470
|
export function asRelativePath(pathOrUri: string | Uri, includeWorkspaceFolder?: boolean): string | undefined;
|
|
6435
6471
|
|
|
6436
6472
|
/**
|
|
6437
|
-
* This method replaces `deleteCount`
|
|
6473
|
+
* This method replaces `deleteCount` {@link workspace.workspaceFolders workspace folders} starting at index `start`
|
|
6438
6474
|
* by an optional set of `workspaceFoldersToAdd` on the `theia.workspace.workspaceFolders` array. This "splice"
|
|
6439
6475
|
* behavior can be used to add, remove and change workspace folders in a single operation.
|
|
6440
6476
|
*
|
|
@@ -6466,7 +6502,7 @@ export module '@theia/plugin' {
|
|
|
6466
6502
|
* **Note:** it is not valid to call [updateWorkspaceFolders()](#updateWorkspaceFolders) multiple times
|
|
6467
6503
|
* without waiting for the [`onDidChangeWorkspaceFolders()`](#onDidChangeWorkspaceFolders) to fire.
|
|
6468
6504
|
*
|
|
6469
|
-
* @param start the zero-based location in the list of currently opened
|
|
6505
|
+
* @param start the zero-based location in the list of currently opened {@link WorkspaceFolder workspace folders}
|
|
6470
6506
|
* from which to start deleting workspace folders.
|
|
6471
6507
|
* @param deleteCount the optional number of workspace folders to remove.
|
|
6472
6508
|
* @param workspaceFoldersToAdd the optional variable set of workspace folders to add in place of the deleted ones.
|
|
@@ -6483,7 +6519,7 @@ export module '@theia/plugin' {
|
|
|
6483
6519
|
*
|
|
6484
6520
|
* @param type The task kind type this provider is registered for.
|
|
6485
6521
|
* @param provider A task provider.
|
|
6486
|
-
* @return A
|
|
6522
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
6487
6523
|
*/
|
|
6488
6524
|
export function registerTaskProvider(type: string, provider: TaskProvider): Disposable;
|
|
6489
6525
|
|
|
@@ -6656,7 +6692,7 @@ export module '@theia/plugin' {
|
|
|
6656
6692
|
/**
|
|
6657
6693
|
* A relative pattern is a helper to construct glob patterns that are matched
|
|
6658
6694
|
* relatively to a base path. The base path can either be an absolute file path
|
|
6659
|
-
* or a
|
|
6695
|
+
* or a {@link WorkspaceFolder workspace folder}.
|
|
6660
6696
|
*/
|
|
6661
6697
|
export class RelativePattern {
|
|
6662
6698
|
|
|
@@ -6687,7 +6723,7 @@ export module '@theia/plugin' {
|
|
|
6687
6723
|
|
|
6688
6724
|
/**
|
|
6689
6725
|
* A file glob pattern to match file paths against. This can either be a glob pattern string
|
|
6690
|
-
* (like `**/*.{ts,js}` or `*.{ts,js}`) or a
|
|
6726
|
+
* (like `**/*.{ts,js}` or `*.{ts,js}`) or a {@link RelativePattern relative pattern}.
|
|
6691
6727
|
*
|
|
6692
6728
|
* Glob patterns can have the following syntax:
|
|
6693
6729
|
* * `*` to match one or more characters in a path segment
|
|
@@ -6701,8 +6737,8 @@ export module '@theia/plugin' {
|
|
|
6701
6737
|
|
|
6702
6738
|
/**
|
|
6703
6739
|
* A document filter denotes a document by different properties like
|
|
6704
|
-
* the
|
|
6705
|
-
* its resource, or a glob-pattern that is applied to the
|
|
6740
|
+
* the {@link TextDocument.languageId language}, the {@link Uri.scheme scheme} of
|
|
6741
|
+
* its resource, or a glob-pattern that is applied to the {@link TextDocument.fileName path}.
|
|
6706
6742
|
*
|
|
6707
6743
|
* @sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }`
|
|
6708
6744
|
* @sample A language filter that applies to all package.json paths: `{ language: 'json', scheme: 'untitled', pattern: '**/package.json' }`
|
|
@@ -6712,23 +6748,23 @@ export module '@theia/plugin' {
|
|
|
6712
6748
|
/**
|
|
6713
6749
|
* A language id, like `typescript`.
|
|
6714
6750
|
*/
|
|
6715
|
-
language?: string;
|
|
6751
|
+
readonly language?: string;
|
|
6716
6752
|
|
|
6717
6753
|
/**
|
|
6718
|
-
* A Uri
|
|
6754
|
+
* A Uri {@link Uri.scheme scheme}, like `file` or `untitled`.
|
|
6719
6755
|
*/
|
|
6720
|
-
scheme?: string;
|
|
6756
|
+
readonly scheme?: string;
|
|
6721
6757
|
|
|
6722
6758
|
/**
|
|
6723
|
-
* A
|
|
6724
|
-
* to filter documents to a
|
|
6759
|
+
* A {@link GlobPattern glob pattern} that is matched on the absolute path of the document. Use a {@link RelativePattern relative pattern}
|
|
6760
|
+
* to filter documents to a {@link WorkspaceFolder workspace folder}.
|
|
6725
6761
|
*/
|
|
6726
|
-
pattern?: GlobPattern;
|
|
6762
|
+
readonly pattern?: GlobPattern;
|
|
6727
6763
|
}
|
|
6728
6764
|
|
|
6729
6765
|
/**
|
|
6730
6766
|
* A language selector is the combination of one or many language identifiers
|
|
6731
|
-
* and
|
|
6767
|
+
* and {@link DocumentFilter language filters}.
|
|
6732
6768
|
*
|
|
6733
6769
|
* *Note* that a document selector that is just a language identifier selects *all*
|
|
6734
6770
|
* documents, even those that are not saved on disk. Only use such selectors when
|
|
@@ -6855,11 +6891,11 @@ export module '@theia/plugin' {
|
|
|
6855
6891
|
/**
|
|
6856
6892
|
* @deprecated Use the autoClosingPairs property in the language configuration file instead.
|
|
6857
6893
|
*/
|
|
6858
|
-
__characterPairSupport?: { autoClosingPairs: { close:
|
|
6894
|
+
__characterPairSupport?: { autoClosingPairs: { open: string; close: string; notIn?: string[]; }[]; };
|
|
6859
6895
|
/**
|
|
6860
6896
|
* @deprecated Do not use. Will be replaced by a better API soon.
|
|
6861
6897
|
*/
|
|
6862
|
-
__electricCharacterSupport?: { brackets
|
|
6898
|
+
__electricCharacterSupport?: { brackets?: any, docComment?: { scope: string; open: string; lineStart: string; close?: string; }; };
|
|
6863
6899
|
/**
|
|
6864
6900
|
* The language's comment settings.
|
|
6865
6901
|
*/
|
|
@@ -7073,7 +7109,7 @@ export module '@theia/plugin' {
|
|
|
7073
7109
|
}
|
|
7074
7110
|
|
|
7075
7111
|
/**
|
|
7076
|
-
* How a
|
|
7112
|
+
* How a {@link CompletionItemProvider completion provider} was triggered
|
|
7077
7113
|
*/
|
|
7078
7114
|
export enum CompletionTriggerKind {
|
|
7079
7115
|
/**
|
|
@@ -7092,7 +7128,7 @@ export module '@theia/plugin' {
|
|
|
7092
7128
|
|
|
7093
7129
|
/**
|
|
7094
7130
|
* Contains additional information about the context in which
|
|
7095
|
-
*
|
|
7131
|
+
* {@link CompletionItemProvider.provideCompletionItems completion provider} is triggered.
|
|
7096
7132
|
*/
|
|
7097
7133
|
export interface CompletionContext {
|
|
7098
7134
|
/**
|
|
@@ -7195,7 +7231,7 @@ export module '@theia/plugin' {
|
|
|
7195
7231
|
/**
|
|
7196
7232
|
* ~~Creates a new symbol information object.~~
|
|
7197
7233
|
*
|
|
7198
|
-
* @deprecated Please use the constructor taking a
|
|
7234
|
+
* @deprecated Please use the constructor taking a {@link Location location} object.
|
|
7199
7235
|
*
|
|
7200
7236
|
* @param name The name of the symbol.
|
|
7201
7237
|
* @param kind The kind of the symbol.
|
|
@@ -7363,15 +7399,15 @@ export module '@theia/plugin' {
|
|
|
7363
7399
|
label: string;
|
|
7364
7400
|
|
|
7365
7401
|
/**
|
|
7366
|
-
* An
|
|
7367
|
-
* this presentation for the color. When `falsy` the
|
|
7402
|
+
* An {@link TextEdit edit} which is applied to a document when selecting
|
|
7403
|
+
* this presentation for the color. When `falsy` the {@link ColorPresentation.label label}
|
|
7368
7404
|
* is used.
|
|
7369
7405
|
*/
|
|
7370
7406
|
textEdit?: TextEdit;
|
|
7371
7407
|
|
|
7372
7408
|
/**
|
|
7373
|
-
* An optional array of additional
|
|
7374
|
-
* selecting this color presentation. Edits must not overlap with the main
|
|
7409
|
+
* An optional array of additional {@link TextEdit text edits} that are applied when
|
|
7410
|
+
* selecting this color presentation. Edits must not overlap with the main {@link ColorPresentation.textEdit edit} nor with themselves.
|
|
7375
7411
|
*/
|
|
7376
7412
|
additionalTextEdits?: TextEdit[];
|
|
7377
7413
|
|
|
@@ -7394,13 +7430,13 @@ export module '@theia/plugin' {
|
|
|
7394
7430
|
*
|
|
7395
7431
|
* @param document The document in which the command was invoked.
|
|
7396
7432
|
* @param token A cancellation token.
|
|
7397
|
-
* @return An array of
|
|
7433
|
+
* @return An array of {@link ColorInformation color information} or a thenable that resolves to such. The lack of a result
|
|
7398
7434
|
* can be signaled by returning `undefined`, `null`, or an empty array.
|
|
7399
7435
|
*/
|
|
7400
7436
|
provideDocumentColors(document: TextDocument, token: CancellationToken): ProviderResult<ColorInformation[]>;
|
|
7401
7437
|
|
|
7402
7438
|
/**
|
|
7403
|
-
* Provide
|
|
7439
|
+
* Provide {@link ColorPresentation representations} for a color.
|
|
7404
7440
|
*
|
|
7405
7441
|
* @param color The color to show and insert.
|
|
7406
7442
|
* @param context A context object with additional information
|
|
@@ -7430,10 +7466,10 @@ export module '@theia/plugin' {
|
|
|
7430
7466
|
end: number;
|
|
7431
7467
|
|
|
7432
7468
|
/**
|
|
7433
|
-
* Describes the
|
|
7434
|
-
*
|
|
7469
|
+
* Describes the {@link FoldingRangeKind Kind} of the folding range such as {@link FoldingRangeKind.Comment Comment} or
|
|
7470
|
+
* {@link FoldingRangeKind.Region Region}. The kind is used to categorize folding ranges and used by commands
|
|
7435
7471
|
* like 'Fold all comments'. See
|
|
7436
|
-
*
|
|
7472
|
+
* {@link FoldingRangeKind FoldingRangeKind} for an enumeration of all kinds.
|
|
7437
7473
|
* If not set, the range is originated from a syntax element.
|
|
7438
7474
|
*/
|
|
7439
7475
|
kind?: FoldingRangeKind;
|
|
@@ -7449,7 +7485,7 @@ export module '@theia/plugin' {
|
|
|
7449
7485
|
}
|
|
7450
7486
|
|
|
7451
7487
|
/**
|
|
7452
|
-
* An enumeration of specific folding range kinds. The kind is an optional field of a
|
|
7488
|
+
* An enumeration of specific folding range kinds. The kind is an optional field of a {@link FoldingRange FoldingRange}
|
|
7453
7489
|
* and is used to distinguish specific folding ranges such as ranges originated from comments. The kind is used by commands like
|
|
7454
7490
|
* `Fold all comments` or `Fold all regions`.
|
|
7455
7491
|
* If the kind is not set on the range, the range originated from a syntax element other than comments, imports or region markers.
|
|
@@ -7577,7 +7613,7 @@ export module '@theia/plugin' {
|
|
|
7577
7613
|
* *Note* that the eol-sequence will be applied to the
|
|
7578
7614
|
* whole document.
|
|
7579
7615
|
*/
|
|
7580
|
-
newEol
|
|
7616
|
+
newEol?: EndOfLine;
|
|
7581
7617
|
|
|
7582
7618
|
/**
|
|
7583
7619
|
* Create a new TextEdit.
|
|
@@ -7661,13 +7697,13 @@ export module '@theia/plugin' {
|
|
|
7661
7697
|
/**
|
|
7662
7698
|
* A completion item represents a text snippet that is proposed to complete text that is being typed.
|
|
7663
7699
|
*
|
|
7664
|
-
* It is sufficient to create a completion item from just a
|
|
7665
|
-
* case the completion item will replace the
|
|
7666
|
-
* until the cursor with the given label or
|
|
7667
|
-
* the given
|
|
7700
|
+
* It is sufficient to create a completion item from just a {@link CompletionItem.label label}. In that
|
|
7701
|
+
* case the completion item will replace the {@link TextDocument.getWordRangeAtPosition word}
|
|
7702
|
+
* until the cursor with the given label or {@link CompletionItem.insertText insertText}. Otherwise the
|
|
7703
|
+
* the given {@link CompletionItem.textEdit edit} is used.
|
|
7668
7704
|
*
|
|
7669
7705
|
* When selecting a completion item in the editor its defined or synthesized text edit will be applied
|
|
7670
|
-
* to *all* cursors/selections whereas
|
|
7706
|
+
* to *all* cursors/selections whereas {@link additionalTextEdits additionalTextEdits} will be
|
|
7671
7707
|
* applied as provided.
|
|
7672
7708
|
*
|
|
7673
7709
|
* @see [CompletionItemProvider.provideCompletionItems](#CompletionItemProvider.provideCompletionItems)
|
|
@@ -7706,14 +7742,14 @@ export module '@theia/plugin' {
|
|
|
7706
7742
|
|
|
7707
7743
|
/**
|
|
7708
7744
|
* A string that should be used when comparing this item
|
|
7709
|
-
* with other items. When `falsy` the
|
|
7745
|
+
* with other items. When `falsy` the {@link CompletionItem.label label}
|
|
7710
7746
|
* is used.
|
|
7711
7747
|
*/
|
|
7712
7748
|
sortText?: string;
|
|
7713
7749
|
|
|
7714
7750
|
/**
|
|
7715
7751
|
* A string that should be used when filtering a set of
|
|
7716
|
-
* completion items. When `falsy` the
|
|
7752
|
+
* completion items. When `falsy` the {@link CompletionItem.label label}
|
|
7717
7753
|
* is used.
|
|
7718
7754
|
*/
|
|
7719
7755
|
filterText?: string;
|
|
@@ -7727,7 +7763,7 @@ export module '@theia/plugin' {
|
|
|
7727
7763
|
|
|
7728
7764
|
/**
|
|
7729
7765
|
* A string or snippet that should be inserted in a document when selecting
|
|
7730
|
-
* this completion. When `falsy` the
|
|
7766
|
+
* this completion. When `falsy` the {@link CompletionItem.label label}
|
|
7731
7767
|
* is used.
|
|
7732
7768
|
*/
|
|
7733
7769
|
insertText?: string | SnippetString;
|
|
@@ -7735,12 +7771,12 @@ export module '@theia/plugin' {
|
|
|
7735
7771
|
/**
|
|
7736
7772
|
* A range or a insert and replace range selecting the text that should be replaced by this completion item.
|
|
7737
7773
|
*
|
|
7738
|
-
* When omitted, the range of the
|
|
7739
|
-
* and as insert-range the start of the
|
|
7774
|
+
* When omitted, the range of the {@link TextDocument.getWordRangeAtPosition current word} is used as replace-range
|
|
7775
|
+
* and as insert-range the start of the {@link TextDocument.getWordRangeAtPosition current word} to the
|
|
7740
7776
|
* current position is used.
|
|
7741
7777
|
*
|
|
7742
|
-
* *Note 1:* A range must be a
|
|
7743
|
-
*
|
|
7778
|
+
* *Note 1:* A range must be a {@link Range.isSingleLine single line} and it must
|
|
7779
|
+
* {@link Range.contains contain} the position at which completion has been {@link CompletionItemProvider.provideCompletionItems requested}.
|
|
7744
7780
|
* *Note 2:* A insert range must be a prefix of a replace range, that means it must be contained and starting at the same position.
|
|
7745
7781
|
*/
|
|
7746
7782
|
range?: Range | { inserting: Range; replacing: Range; };
|
|
@@ -7753,35 +7789,35 @@ export module '@theia/plugin' {
|
|
|
7753
7789
|
commitCharacters?: string[];
|
|
7754
7790
|
|
|
7755
7791
|
/**
|
|
7756
|
-
* Keep whitespace of the
|
|
7792
|
+
* Keep whitespace of the {@link CompletionItem.insertText insertText} as is. By default, the editor adjusts leading
|
|
7757
7793
|
* whitespace of new lines so that they match the indentation of the line for which the item is accepted - setting
|
|
7758
7794
|
* this to `true` will prevent that.
|
|
7759
7795
|
*/
|
|
7760
7796
|
keepWhitespace?: boolean;
|
|
7761
7797
|
|
|
7762
7798
|
/**
|
|
7763
|
-
* An optional array of additional
|
|
7764
|
-
* selecting this completion. Edits must not overlap with the main
|
|
7799
|
+
* An optional array of additional {@link TextEdit text edits} that are applied when
|
|
7800
|
+
* selecting this completion. Edits must not overlap with the main {@link CompletionItem.textEdit edit}
|
|
7765
7801
|
* nor with themselves.
|
|
7766
7802
|
*/
|
|
7767
7803
|
additionalTextEdits?: TextEdit[];
|
|
7768
7804
|
|
|
7769
7805
|
/**
|
|
7770
|
-
* An optional
|
|
7806
|
+
* An optional {@link Command command} that is executed *after* inserting this completion. *Note* that
|
|
7771
7807
|
* additional modifications to the current document should be described with the
|
|
7772
|
-
*
|
|
7808
|
+
* {@link additionalTextEdits additionalTextEdits}-property.
|
|
7773
7809
|
*/
|
|
7774
7810
|
command?: Command;
|
|
7775
7811
|
|
|
7776
7812
|
/**
|
|
7777
7813
|
* @deprecated Use `CompletionItem.insertText` and `CompletionItem.range` instead.
|
|
7778
7814
|
*
|
|
7779
|
-
* ~~An
|
|
7815
|
+
* ~~An {@link TextEdit edit} which is applied to a document when selecting
|
|
7780
7816
|
* this completion. When an edit is provided the value of
|
|
7781
|
-
*
|
|
7817
|
+
* {@link CompletionItem.insertText insertText} is ignored.~~
|
|
7782
7818
|
*
|
|
7783
|
-
* ~~The
|
|
7784
|
-
* line completions were
|
|
7819
|
+
* ~~The {@link Range range} of the edit must be single-line and on the same
|
|
7820
|
+
* line completions were {@link CompletionItemProvider.provideCompletionItems requested} at.~~
|
|
7785
7821
|
*/
|
|
7786
7822
|
textEdit?: TextEdit;
|
|
7787
7823
|
|
|
@@ -7793,17 +7829,17 @@ export module '@theia/plugin' {
|
|
|
7793
7829
|
/**
|
|
7794
7830
|
* Creates a new completion item.
|
|
7795
7831
|
*
|
|
7796
|
-
* Completion items must have at least a
|
|
7832
|
+
* Completion items must have at least a {@link CompletionItem.label label} which then
|
|
7797
7833
|
* will be used as insert text as well as for sorting and filtering.
|
|
7798
7834
|
*
|
|
7799
7835
|
* @param label The label of the completion.
|
|
7800
|
-
* @param kind The
|
|
7836
|
+
* @param kind The {@link CompletionItemKind kind} of the completion.
|
|
7801
7837
|
*/
|
|
7802
7838
|
constructor(label: string | CompletionItemLabel, kind?: CompletionItemKind);
|
|
7803
7839
|
}
|
|
7804
7840
|
|
|
7805
7841
|
/**
|
|
7806
|
-
* Represents a collection of
|
|
7842
|
+
* Represents a collection of {@link CompletionItem completion items} to be presented
|
|
7807
7843
|
* in the editor.
|
|
7808
7844
|
*/
|
|
7809
7845
|
export class CompletionList<T extends CompletionItem = CompletionItem> {
|
|
@@ -7817,7 +7853,7 @@ export module '@theia/plugin' {
|
|
|
7817
7853
|
/**
|
|
7818
7854
|
* The completion items.
|
|
7819
7855
|
*/
|
|
7820
|
-
items:
|
|
7856
|
+
items: T[];
|
|
7821
7857
|
|
|
7822
7858
|
/**
|
|
7823
7859
|
* Creates a new completion list.
|
|
@@ -7825,7 +7861,7 @@ export module '@theia/plugin' {
|
|
|
7825
7861
|
* @param items The completion items.
|
|
7826
7862
|
* @param isIncomplete The list is not complete.
|
|
7827
7863
|
*/
|
|
7828
|
-
constructor(items?:
|
|
7864
|
+
constructor(items?: T[], isIncomplete?: boolean);
|
|
7829
7865
|
}
|
|
7830
7866
|
|
|
7831
7867
|
/**
|
|
@@ -7850,7 +7886,7 @@ export module '@theia/plugin' {
|
|
|
7850
7886
|
* @param token A cancellation token.
|
|
7851
7887
|
* @param context How the completion was triggered.
|
|
7852
7888
|
*
|
|
7853
|
-
* @return An array of completions, a
|
|
7889
|
+
* @return An array of completions, a {@link CompletionList completion list}, or a thenable that resolves to either.
|
|
7854
7890
|
* The lack of a result can be signaled by returning `undefined`, `null`, or an empty array.
|
|
7855
7891
|
*/
|
|
7856
7892
|
provideCompletionItems(document: TextDocument,
|
|
@@ -7860,7 +7896,7 @@ export module '@theia/plugin' {
|
|
|
7860
7896
|
|
|
7861
7897
|
/**
|
|
7862
7898
|
* Given a completion item fill in more data, like [doc-comment](#CompletionItem.documentation)
|
|
7863
|
-
* or
|
|
7899
|
+
* or {@link CompletionItem.detail details}.
|
|
7864
7900
|
*
|
|
7865
7901
|
* The editor will only resolve a completion item once.
|
|
7866
7902
|
*
|
|
@@ -7919,7 +7955,7 @@ export module '@theia/plugin' {
|
|
|
7919
7955
|
/**
|
|
7920
7956
|
* An array of resources for which diagnostics have changed.
|
|
7921
7957
|
*/
|
|
7922
|
-
readonly uris: Uri[];
|
|
7958
|
+
readonly uris: readonly Uri[];
|
|
7923
7959
|
}
|
|
7924
7960
|
|
|
7925
7961
|
/**
|
|
@@ -8015,7 +8051,7 @@ export module '@theia/plugin' {
|
|
|
8015
8051
|
message: string;
|
|
8016
8052
|
|
|
8017
8053
|
/**
|
|
8018
|
-
* The severity, default is
|
|
8054
|
+
* The severity, default is {@link DiagnosticSeverity.Error error}.
|
|
8019
8055
|
*/
|
|
8020
8056
|
severity: DiagnosticSeverity;
|
|
8021
8057
|
|
|
@@ -8028,7 +8064,7 @@ export module '@theia/plugin' {
|
|
|
8028
8064
|
/**
|
|
8029
8065
|
* A code or identifier for this diagnostics. Will not be surfaced
|
|
8030
8066
|
* to the user, but should be used for later processing, e.g. when
|
|
8031
|
-
* providing
|
|
8067
|
+
* providing {@link CodeActionContext code actions}.
|
|
8032
8068
|
*/
|
|
8033
8069
|
code?: string | number;
|
|
8034
8070
|
|
|
@@ -8048,7 +8084,7 @@ export module '@theia/plugin' {
|
|
|
8048
8084
|
*
|
|
8049
8085
|
* @param range The range to which this diagnostic applies.
|
|
8050
8086
|
* @param message The human-readable message.
|
|
8051
|
-
* @param severity The severity, default is
|
|
8087
|
+
* @param severity The severity, default is {@link DiagnosticSeverity.Error error}.
|
|
8052
8088
|
*/
|
|
8053
8089
|
constructor(range: Range, message: string, severity?: DiagnosticSeverity);
|
|
8054
8090
|
}
|
|
@@ -8103,16 +8139,16 @@ export module '@theia/plugin' {
|
|
|
8103
8139
|
* @param callback Function to execute for each entry.
|
|
8104
8140
|
* @param thisArg The `this` context used when invoking the handler function.
|
|
8105
8141
|
*/
|
|
8106
|
-
forEach(callback: (uri: Uri, diagnostics: Diagnostic[], collection: DiagnosticCollection) => any, thisArg?: any): void;
|
|
8142
|
+
forEach(callback: (uri: Uri, diagnostics: readonly Diagnostic[], collection: DiagnosticCollection) => any, thisArg?: any): void;
|
|
8107
8143
|
|
|
8108
8144
|
/**
|
|
8109
8145
|
* Get the diagnostics for a given resource. *Note* that you cannot
|
|
8110
8146
|
* modify the diagnostics-array returned from this call.
|
|
8111
8147
|
*
|
|
8112
8148
|
* @param uri A resource identifier.
|
|
8113
|
-
* @returns An immutable array of
|
|
8149
|
+
* @returns An immutable array of {@link Diagnostic diagnostics} or `undefined`.
|
|
8114
8150
|
*/
|
|
8115
|
-
get(uri: Uri): Diagnostic[] | undefined;
|
|
8151
|
+
get(uri: Uri): readonly Diagnostic[] | undefined;
|
|
8116
8152
|
|
|
8117
8153
|
/**
|
|
8118
8154
|
* Check if this collection contains diagnostics for a
|
|
@@ -8125,7 +8161,7 @@ export module '@theia/plugin' {
|
|
|
8125
8161
|
|
|
8126
8162
|
/**
|
|
8127
8163
|
* Dispose and free associated resources. Calls
|
|
8128
|
-
*
|
|
8164
|
+
* {@link DiagnosticCollection.clear clear}.
|
|
8129
8165
|
*/
|
|
8130
8166
|
dispose(): void;
|
|
8131
8167
|
}
|
|
@@ -8221,22 +8257,22 @@ export module '@theia/plugin' {
|
|
|
8221
8257
|
title: string;
|
|
8222
8258
|
|
|
8223
8259
|
/**
|
|
8224
|
-
*
|
|
8260
|
+
* {@link Diagnostic Diagnostics} that this code action resolves.
|
|
8225
8261
|
*/
|
|
8226
8262
|
diagnostics?: Diagnostic[];
|
|
8227
8263
|
|
|
8228
8264
|
/**
|
|
8229
|
-
* A
|
|
8265
|
+
* A {@link WorkspaceEdit workspace edit} this code action performs.
|
|
8230
8266
|
*/
|
|
8231
8267
|
edit?: WorkspaceEdit;
|
|
8232
8268
|
|
|
8233
8269
|
/**
|
|
8234
|
-
* A
|
|
8270
|
+
* A {@link Command command} this code action executes.
|
|
8235
8271
|
*/
|
|
8236
8272
|
command?: Command;
|
|
8237
8273
|
|
|
8238
8274
|
/**
|
|
8239
|
-
*
|
|
8275
|
+
* {@link CodeActionKind Kind} of the code action.
|
|
8240
8276
|
*
|
|
8241
8277
|
* Used to filter code actions.
|
|
8242
8278
|
*/
|
|
@@ -8255,8 +8291,8 @@ export module '@theia/plugin' {
|
|
|
8255
8291
|
/**
|
|
8256
8292
|
* Creates a new code action.
|
|
8257
8293
|
*
|
|
8258
|
-
* A code action must have at least a
|
|
8259
|
-
* and/or a
|
|
8294
|
+
* A code action must have at least a {@link CodeAction.title title} and {@link CodeAction.edit edits}
|
|
8295
|
+
* and/or a {@link CodeAction.command command}.
|
|
8260
8296
|
*
|
|
8261
8297
|
* @param title The title of the code action.
|
|
8262
8298
|
* @param kind The kind of the code action.
|
|
@@ -8268,7 +8304,7 @@ export module '@theia/plugin' {
|
|
|
8268
8304
|
* The code action interface defines the contract between extensions and
|
|
8269
8305
|
* the [light bulb](https://code.visualstudio.com/docs/editor/editingevolved#_code-action) feature.
|
|
8270
8306
|
*
|
|
8271
|
-
* A code action can be any command that is
|
|
8307
|
+
* A code action can be any command that is {@link commands.getCommands known} to the system.
|
|
8272
8308
|
*/
|
|
8273
8309
|
export interface CodeActionProvider<T extends CodeAction = CodeAction> {
|
|
8274
8310
|
/**
|
|
@@ -8302,11 +8338,11 @@ export module '@theia/plugin' {
|
|
|
8302
8338
|
}
|
|
8303
8339
|
|
|
8304
8340
|
/**
|
|
8305
|
-
* Metadata about the type of code actions that a
|
|
8341
|
+
* Metadata about the type of code actions that a {@link CodeActionProvider CodeActionProvider} providers
|
|
8306
8342
|
*/
|
|
8307
8343
|
export interface CodeActionProviderMetadata {
|
|
8308
8344
|
/**
|
|
8309
|
-
*
|
|
8345
|
+
* {@link CodeActionKind CodeActionKinds} that this provider may return.
|
|
8310
8346
|
*
|
|
8311
8347
|
* The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the provider
|
|
8312
8348
|
* may list our every specific kind they provide, such as `CodeActionKind.Refactor.Extract.append('function`)`
|
|
@@ -8322,7 +8358,7 @@ export module '@theia/plugin' {
|
|
|
8322
8358
|
}
|
|
8323
8359
|
|
|
8324
8360
|
/**
|
|
8325
|
-
* A code lens represents a
|
|
8361
|
+
* A code lens represents a {@link Command command} that should be shown along with
|
|
8326
8362
|
* source text, like the number of references, a way to run tests, etc.
|
|
8327
8363
|
*
|
|
8328
8364
|
* A code lens is _unresolved_ when no command is associated to it. For performance
|
|
@@ -8358,7 +8394,7 @@ export module '@theia/plugin' {
|
|
|
8358
8394
|
}
|
|
8359
8395
|
|
|
8360
8396
|
/**
|
|
8361
|
-
* A code lens provider adds
|
|
8397
|
+
* A code lens provider adds {@link Command commands} to source text. The commands will be shown
|
|
8362
8398
|
* as dedicated horizontal lines in between the source text.
|
|
8363
8399
|
*/
|
|
8364
8400
|
export interface CodeLensProvider<T extends CodeLens = CodeLens> {
|
|
@@ -8367,9 +8403,9 @@ export module '@theia/plugin' {
|
|
|
8367
8403
|
*/
|
|
8368
8404
|
onDidChangeCodeLenses?: Event<void>;
|
|
8369
8405
|
/**
|
|
8370
|
-
* Compute a list of
|
|
8406
|
+
* Compute a list of {@link CodeLens lenses}. This call should return as fast as possible and if
|
|
8371
8407
|
* computing the commands is expensive implementors should only return code lens objects with the
|
|
8372
|
-
* range set and implement
|
|
8408
|
+
* range set and implement {@link CodeLensProvider.resolveCodeLens resolve}.
|
|
8373
8409
|
*
|
|
8374
8410
|
* @param document The document in which the command was invoked.
|
|
8375
8411
|
* @param token A cancellation token.
|
|
@@ -8379,7 +8415,7 @@ export module '@theia/plugin' {
|
|
|
8379
8415
|
provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult<T[]>;
|
|
8380
8416
|
/**
|
|
8381
8417
|
* This function will be called for each visible code lens, usually when scrolling and after
|
|
8382
|
-
* calls to
|
|
8418
|
+
* calls to {@link CodeLensProvider.provideCodeLenses compute}-lenses.
|
|
8383
8419
|
*
|
|
8384
8420
|
* @param codeLens code lens that must be resolved.
|
|
8385
8421
|
* @param token A cancellation token.
|
|
@@ -8511,13 +8547,13 @@ export module '@theia/plugin' {
|
|
|
8511
8547
|
|
|
8512
8548
|
/**
|
|
8513
8549
|
* Contains additional diagnostic information about the context in which
|
|
8514
|
-
* a
|
|
8550
|
+
* a {@link CodeActionProvider.provideCodeActions code action} is run.
|
|
8515
8551
|
*/
|
|
8516
8552
|
export interface CodeActionContext {
|
|
8517
8553
|
/**
|
|
8518
8554
|
* An array of diagnostics.
|
|
8519
8555
|
*/
|
|
8520
|
-
readonly diagnostics: Diagnostic[];
|
|
8556
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
8521
8557
|
|
|
8522
8558
|
/**
|
|
8523
8559
|
* Requested kind of actions to return.
|
|
@@ -8550,7 +8586,7 @@ export module '@theia/plugin' {
|
|
|
8550
8586
|
description?: string;
|
|
8551
8587
|
|
|
8552
8588
|
/**
|
|
8553
|
-
* The icon path or
|
|
8589
|
+
* The icon path or {@link ThemeIcon ThemeIcon} for the edit.
|
|
8554
8590
|
*/
|
|
8555
8591
|
iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;
|
|
8556
8592
|
}
|
|
@@ -8559,7 +8595,7 @@ export module '@theia/plugin' {
|
|
|
8559
8595
|
* A workspace edit is a collection of textual and files changes for
|
|
8560
8596
|
* multiple resources and documents.
|
|
8561
8597
|
*
|
|
8562
|
-
* Use the
|
|
8598
|
+
* Use the {@link workspace.applyEdit applyEdit}-function to apply a workspace edit.
|
|
8563
8599
|
*/
|
|
8564
8600
|
export class WorkspaceEdit {
|
|
8565
8601
|
|
|
@@ -8804,13 +8840,13 @@ export module '@theia/plugin' {
|
|
|
8804
8840
|
*
|
|
8805
8841
|
* @param document The document in which the command was invoked.
|
|
8806
8842
|
* @param token A cancellation token.
|
|
8807
|
-
* @return An array of
|
|
8843
|
+
* @return An array of {@link DocumentLink document links} or a thenable that resolves to such. The lack of a result
|
|
8808
8844
|
* can be signaled by returning `undefined`, `null`, or an empty array.
|
|
8809
8845
|
*/
|
|
8810
8846
|
provideDocumentLinks(document: TextDocument, token: CancellationToken): ProviderResult<T[]>;
|
|
8811
8847
|
|
|
8812
8848
|
/**
|
|
8813
|
-
* Given a link fill in its
|
|
8849
|
+
* Given a link fill in its {@link DocumentLink.target target}. This method is called when an incomplete
|
|
8814
8850
|
* link is selected in the UI. Providers can implement this method and return incomplete links
|
|
8815
8851
|
* (without target) from the [`provideDocumentLinks`](#DocumentLinkProvider.provideDocumentLinks) method which
|
|
8816
8852
|
* often helps to improve performance.
|
|
@@ -8906,8 +8942,8 @@ export module '@theia/plugin' {
|
|
|
8906
8942
|
|
|
8907
8943
|
/**
|
|
8908
8944
|
* Represents semantic tokens, either in a range or in an entire document.
|
|
8909
|
-
* @see
|
|
8910
|
-
* @see
|
|
8945
|
+
* @see {@link DocumentSemanticTokensProvider.provideDocumentSemanticTokens provideDocumentSemanticTokens} for an explanation of the format.
|
|
8946
|
+
* @see {@link SemanticTokensBuilder} for a helper to create an instance.
|
|
8911
8947
|
*/
|
|
8912
8948
|
export class SemanticTokens {
|
|
8913
8949
|
/**
|
|
@@ -8915,10 +8951,10 @@ export module '@theia/plugin' {
|
|
|
8915
8951
|
*
|
|
8916
8952
|
* This is the id that will be passed to `DocumentSemanticTokensProvider.provideDocumentSemanticTokensEdits` (if implemented).
|
|
8917
8953
|
*/
|
|
8918
|
-
readonly resultId
|
|
8954
|
+
readonly resultId: string | undefined;
|
|
8919
8955
|
/**
|
|
8920
8956
|
* The actual tokens data.
|
|
8921
|
-
* @see
|
|
8957
|
+
* @see {@link DocumentSemanticTokensProvider.provideDocumentSemanticTokens provideDocumentSemanticTokens} for an explanation of the format.
|
|
8922
8958
|
*/
|
|
8923
8959
|
readonly data: Uint32Array;
|
|
8924
8960
|
|
|
@@ -8927,7 +8963,7 @@ export module '@theia/plugin' {
|
|
|
8927
8963
|
|
|
8928
8964
|
/**
|
|
8929
8965
|
* Represents edits to semantic tokens.
|
|
8930
|
-
* @see
|
|
8966
|
+
* @see {@link DocumentSemanticTokensProvider.provideDocumentSemanticTokensEdits provideDocumentSemanticTokensEdits} for an explanation of the format.
|
|
8931
8967
|
*/
|
|
8932
8968
|
export class SemanticTokensEdits {
|
|
8933
8969
|
/**
|
|
@@ -8935,7 +8971,7 @@ export module '@theia/plugin' {
|
|
|
8935
8971
|
*
|
|
8936
8972
|
* This is the id that will be passed to `DocumentSemanticTokensProvider.provideDocumentSemanticTokensEdits` (if implemented).
|
|
8937
8973
|
*/
|
|
8938
|
-
readonly resultId
|
|
8974
|
+
readonly resultId: string | undefined;
|
|
8939
8975
|
/**
|
|
8940
8976
|
* The edits to the tokens data.
|
|
8941
8977
|
* All edits refer to the initial data state.
|
|
@@ -8947,7 +8983,7 @@ export module '@theia/plugin' {
|
|
|
8947
8983
|
|
|
8948
8984
|
/**
|
|
8949
8985
|
* Represents an edit to semantic tokens.
|
|
8950
|
-
* @see
|
|
8986
|
+
* @see {@link DocumentSemanticTokensProvider.provideDocumentSemanticTokensEdits provideDocumentSemanticTokensEdits} for an explanation of the format.
|
|
8951
8987
|
*/
|
|
8952
8988
|
export class SemanticTokensEdit {
|
|
8953
8989
|
/**
|
|
@@ -8961,7 +8997,7 @@ export module '@theia/plugin' {
|
|
|
8961
8997
|
/**
|
|
8962
8998
|
* The elements to insert.
|
|
8963
8999
|
*/
|
|
8964
|
-
readonly data
|
|
9000
|
+
readonly data: Uint32Array | undefined;
|
|
8965
9001
|
|
|
8966
9002
|
constructor(start: number, deleteCount: number, data?: Uint32Array);
|
|
8967
9003
|
}
|
|
@@ -9031,7 +9067,7 @@ export module '@theia/plugin' {
|
|
|
9031
9067
|
* [ 2,5,3,0,3, 0,5,4,1,0, 3,2,7,2,0 ]
|
|
9032
9068
|
* ```
|
|
9033
9069
|
*
|
|
9034
|
-
* @see
|
|
9070
|
+
* @see {@link SemanticTokensBuilder SemanticTokensBuilder} for a helper to encode tokens as integers.
|
|
9035
9071
|
* *NOTE*: When doing edits, it is possible that multiple edits occur until VS Code decides to invoke the semantic tokens provider.
|
|
9036
9072
|
* *NOTE*: If the provider cannot temporarily compute semantic tokens, it can indicate this by throwing an error with the message 'Busy'.
|
|
9037
9073
|
*/
|
|
@@ -9075,7 +9111,7 @@ export module '@theia/plugin' {
|
|
|
9075
9111
|
*/
|
|
9076
9112
|
export interface DocumentRangeSemanticTokensProvider {
|
|
9077
9113
|
/**
|
|
9078
|
-
* @see
|
|
9114
|
+
* @see {@link DocumentSemanticTokensProvider.provideDocumentSemanticTokens provideDocumentSemanticTokens}.
|
|
9079
9115
|
*/
|
|
9080
9116
|
provideDocumentRangeSemanticTokens(document: TextDocument, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;
|
|
9081
9117
|
}
|
|
@@ -9088,7 +9124,7 @@ export module '@theia/plugin' {
|
|
|
9088
9124
|
export function getLanguages(): Thenable<string[]>;
|
|
9089
9125
|
|
|
9090
9126
|
/**
|
|
9091
|
-
* Set (and change) the
|
|
9127
|
+
* Set (and change) the {@link TextDocument.languageId language} that is associated
|
|
9092
9128
|
* with the given document.
|
|
9093
9129
|
*
|
|
9094
9130
|
* *Note* that calling this function will trigger the [`onDidCloseTextDocument`](#workspace.onDidCloseTextDocument) event
|
|
@@ -9101,7 +9137,7 @@ export module '@theia/plugin' {
|
|
|
9101
9137
|
export function setTextDocumentLanguage(document: TextDocument, languageId: string): Thenable<TextDocument>;
|
|
9102
9138
|
|
|
9103
9139
|
/**
|
|
9104
|
-
* Compute the match between a document
|
|
9140
|
+
* Compute the match between a document {@link DocumentSelector selector} and a document. Values
|
|
9105
9141
|
* greater than zero mean the selector matches the document.
|
|
9106
9142
|
*
|
|
9107
9143
|
* A match is computed according to these rules:
|
|
@@ -9140,7 +9176,7 @@ export module '@theia/plugin' {
|
|
|
9140
9176
|
export function match(selector: DocumentSelector, document: TextDocument): number;
|
|
9141
9177
|
|
|
9142
9178
|
/**
|
|
9143
|
-
* An
|
|
9179
|
+
* An {@link Event event} which fires when the global set of diagnostics changes. This is
|
|
9144
9180
|
* newly added and removed diagnostics.
|
|
9145
9181
|
*/
|
|
9146
9182
|
export const onDidChangeDiagnostics: Event<DiagnosticChangeEvent>;
|
|
@@ -9150,7 +9186,7 @@ export module '@theia/plugin' {
|
|
|
9150
9186
|
* all extensions but *not yet* from the task framework.
|
|
9151
9187
|
*
|
|
9152
9188
|
* @param resource A resource
|
|
9153
|
-
* @returns An array of
|
|
9189
|
+
* @returns An array of {@link Diagnostic diagnostics} objects or an empty array.
|
|
9154
9190
|
*/
|
|
9155
9191
|
export function getDiagnostics(resource: Uri): Diagnostic[];
|
|
9156
9192
|
|
|
@@ -9165,17 +9201,17 @@ export module '@theia/plugin' {
|
|
|
9165
9201
|
/**
|
|
9166
9202
|
* Create a diagnostics collection.
|
|
9167
9203
|
*
|
|
9168
|
-
* @param name The
|
|
9204
|
+
* @param name The {@link DiagnosticCollection.name name} of the collection.
|
|
9169
9205
|
* @return A new diagnostic collection.
|
|
9170
9206
|
*/
|
|
9171
9207
|
export function createDiagnosticCollection(name?: string): DiagnosticCollection;
|
|
9172
9208
|
|
|
9173
9209
|
/**
|
|
9174
|
-
* Set a
|
|
9210
|
+
* Set a {@link LanguageConfiguration language configuration} for a language.
|
|
9175
9211
|
*
|
|
9176
9212
|
* @param language A language identifier like `typescript`.
|
|
9177
9213
|
* @param configuration Language configuration.
|
|
9178
|
-
* @return A
|
|
9214
|
+
* @return A {@link Disposable disposable} that unsets this configuration.
|
|
9179
9215
|
*/
|
|
9180
9216
|
export function setLanguageConfiguration(language: string, configuration: LanguageConfiguration): Disposable;
|
|
9181
9217
|
|
|
@@ -9183,7 +9219,7 @@ export module '@theia/plugin' {
|
|
|
9183
9219
|
* Register a completion provider.
|
|
9184
9220
|
*
|
|
9185
9221
|
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9186
|
-
* by their
|
|
9222
|
+
* by their {@link languages.match score} and groups of equal score are sequentially asked for
|
|
9187
9223
|
* completion items. The process stops when one or many providers of a group return a
|
|
9188
9224
|
* result. A failing provider (rejected promise or exception) will not fail the whole
|
|
9189
9225
|
* operation.
|
|
@@ -9191,7 +9227,7 @@ export module '@theia/plugin' {
|
|
|
9191
9227
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9192
9228
|
* @param provider A completion provider.
|
|
9193
9229
|
* @param triggerCharacters Trigger completion when the user types one of the characters, like `.` or `:`.
|
|
9194
|
-
* @return A
|
|
9230
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9195
9231
|
*/
|
|
9196
9232
|
export function registerCompletionItemProvider(selector: DocumentSelector, provider: CompletionItemProvider, ...triggerCharacters: string[]): Disposable;
|
|
9197
9233
|
|
|
@@ -9204,7 +9240,7 @@ export module '@theia/plugin' {
|
|
|
9204
9240
|
*
|
|
9205
9241
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9206
9242
|
* @param provider A definition provider.
|
|
9207
|
-
* @return A
|
|
9243
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9208
9244
|
*/
|
|
9209
9245
|
export function registerDefinitionProvider(selector: DocumentSelector, provider: DefinitionProvider): Disposable;
|
|
9210
9246
|
|
|
@@ -9217,7 +9253,7 @@ export module '@theia/plugin' {
|
|
|
9217
9253
|
*
|
|
9218
9254
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9219
9255
|
* @param provider A declaration provider.
|
|
9220
|
-
* @return A
|
|
9256
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9221
9257
|
*/
|
|
9222
9258
|
export function registerDeclarationProvider(selector: DocumentSelector, provider: DeclarationProvider): Disposable;
|
|
9223
9259
|
|
|
@@ -9225,14 +9261,14 @@ export module '@theia/plugin' {
|
|
|
9225
9261
|
* Register a signature help provider.
|
|
9226
9262
|
*
|
|
9227
9263
|
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9228
|
-
* by their
|
|
9264
|
+
* by their {@link languages.match score} and called sequentially until a provider returns a
|
|
9229
9265
|
* valid result.
|
|
9230
9266
|
*
|
|
9231
9267
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9232
9268
|
* @param provider A signature help provider.
|
|
9233
9269
|
* @param triggerCharacters Trigger signature help when the user types one of the characters, like `,` or `(`.
|
|
9234
9270
|
* @param metadata Information about the provider.
|
|
9235
|
-
* @return A
|
|
9271
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9236
9272
|
*/
|
|
9237
9273
|
export function registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, ...triggerCharacters: string[]): Disposable;
|
|
9238
9274
|
export function registerSignatureHelpProvider(selector: DocumentSelector, provider: SignatureHelpProvider, metadata: SignatureHelpProviderMetadata): Disposable;
|
|
@@ -9246,7 +9282,7 @@ export module '@theia/plugin' {
|
|
|
9246
9282
|
*
|
|
9247
9283
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9248
9284
|
* @param provider A type definition provider.
|
|
9249
|
-
* @return A
|
|
9285
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9250
9286
|
*/
|
|
9251
9287
|
export function registerTypeDefinitionProvider(selector: DocumentSelector, provider: TypeDefinitionProvider): Disposable;
|
|
9252
9288
|
|
|
@@ -9259,7 +9295,7 @@ export module '@theia/plugin' {
|
|
|
9259
9295
|
*
|
|
9260
9296
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9261
9297
|
* @param provider An implementation provider.
|
|
9262
|
-
* @return A
|
|
9298
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9263
9299
|
*/
|
|
9264
9300
|
export function registerImplementationProvider(selector: DocumentSelector, provider: ImplementationProvider): Disposable;
|
|
9265
9301
|
|
|
@@ -9272,7 +9308,7 @@ export module '@theia/plugin' {
|
|
|
9272
9308
|
*
|
|
9273
9309
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9274
9310
|
* @param provider A hover provider.
|
|
9275
|
-
* @return A
|
|
9311
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9276
9312
|
*/
|
|
9277
9313
|
export function registerHoverProvider(selector: DocumentSelector, provider: HoverProvider): Disposable;
|
|
9278
9314
|
|
|
@@ -9296,7 +9332,7 @@ export module '@theia/plugin' {
|
|
|
9296
9332
|
* not cause a failure of the whole operation.
|
|
9297
9333
|
*
|
|
9298
9334
|
* @param provider A workspace symbol provider.
|
|
9299
|
-
* @return A
|
|
9335
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9300
9336
|
*/
|
|
9301
9337
|
export function registerWorkspaceSymbolProvider(provider: WorkspaceSymbolProvider): Disposable;
|
|
9302
9338
|
|
|
@@ -9304,12 +9340,12 @@ export module '@theia/plugin' {
|
|
|
9304
9340
|
* Register a document highlight provider.
|
|
9305
9341
|
*
|
|
9306
9342
|
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9307
|
-
* by their
|
|
9343
|
+
* by their {@link languages.match score} and groups sequentially asked for document highlights.
|
|
9308
9344
|
* The process stops when a provider returns a `non-falsy` or `non-failure` result.
|
|
9309
9345
|
*
|
|
9310
9346
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9311
9347
|
* @param provider A document highlight provider.
|
|
9312
|
-
* @return A
|
|
9348
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9313
9349
|
*/
|
|
9314
9350
|
export function registerDocumentHighlightProvider(selector: DocumentSelector, provider: DocumentHighlightProvider): Disposable;
|
|
9315
9351
|
|
|
@@ -9317,29 +9353,29 @@ export module '@theia/plugin' {
|
|
|
9317
9353
|
* Register a formatting provider for a document.
|
|
9318
9354
|
*
|
|
9319
9355
|
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9320
|
-
* by their
|
|
9356
|
+
* by their {@link languages.match score} and the best-matching provider is used. Failure
|
|
9321
9357
|
* of the selected provider will cause a failure of the whole operation.
|
|
9322
9358
|
*
|
|
9323
9359
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9324
9360
|
* @param provider A document formatting edit provider.
|
|
9325
|
-
* @return A
|
|
9361
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9326
9362
|
*/
|
|
9327
9363
|
export function registerDocumentFormattingEditProvider(selector: DocumentSelector, provider: DocumentFormattingEditProvider): Disposable;
|
|
9328
9364
|
|
|
9329
9365
|
/**
|
|
9330
9366
|
* Register a formatting provider for a document range.
|
|
9331
9367
|
*
|
|
9332
|
-
* *Note:* A document range provider is also a
|
|
9333
|
-
* which means there is no need to
|
|
9368
|
+
* *Note:* A document range provider is also a {@link DocumentFormattingEditProvider document formatter}
|
|
9369
|
+
* which means there is no need to {@link registerDocumentFormattingEditProvider register} a document
|
|
9334
9370
|
* formatter when also registering a range provider.
|
|
9335
9371
|
*
|
|
9336
9372
|
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9337
|
-
* by their
|
|
9373
|
+
* by their {@link languages.match score} and the best-matching provider is used. Failure
|
|
9338
9374
|
* of the selected provider will cause a failure of the whole operation.
|
|
9339
9375
|
*
|
|
9340
9376
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9341
9377
|
* @param provider A document range formatting edit provider.
|
|
9342
|
-
* @return A
|
|
9378
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9343
9379
|
*/
|
|
9344
9380
|
export function registerDocumentRangeFormattingEditProvider(selector: DocumentSelector, provider: DocumentRangeFormattingEditProvider): Disposable;
|
|
9345
9381
|
|
|
@@ -9353,7 +9389,7 @@ export module '@theia/plugin' {
|
|
|
9353
9389
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9354
9390
|
* @param provider A code action provider.
|
|
9355
9391
|
* @param metadata Metadata about the kind of code actions the provider providers.
|
|
9356
|
-
* @return A
|
|
9392
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9357
9393
|
*/
|
|
9358
9394
|
export function registerCodeActionsProvider(selector: DocumentSelector, provider: CodeActionProvider, metadata?: CodeActionProviderMetadata): Disposable;
|
|
9359
9395
|
|
|
@@ -9366,7 +9402,7 @@ export module '@theia/plugin' {
|
|
|
9366
9402
|
*
|
|
9367
9403
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9368
9404
|
* @param provider A code lens provider.
|
|
9369
|
-
* @return A
|
|
9405
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9370
9406
|
*/
|
|
9371
9407
|
export function registerCodeLensProvider(selector: DocumentSelector, provider: CodeLensProvider): Disposable;
|
|
9372
9408
|
|
|
@@ -9374,14 +9410,14 @@ export module '@theia/plugin' {
|
|
|
9374
9410
|
* Register a formatting provider that works on type. The provider is active when the user enables the setting `editor.formatOnType`.
|
|
9375
9411
|
*
|
|
9376
9412
|
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9377
|
-
* by their
|
|
9413
|
+
* by their {@link languages.match score} and the best-matching provider is used. Failure
|
|
9378
9414
|
* of the selected provider will cause a failure of the whole operation.
|
|
9379
9415
|
*
|
|
9380
9416
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9381
9417
|
* @param provider An on type formatting edit provider.
|
|
9382
9418
|
* @param firstTriggerCharacter A character on which formatting should be triggered, like `}`.
|
|
9383
9419
|
* @param moreTriggerCharacter More trigger characters.
|
|
9384
|
-
* @return A
|
|
9420
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9385
9421
|
*/
|
|
9386
9422
|
export function registerOnTypeFormattingEditProvider(
|
|
9387
9423
|
selector: DocumentSelector,
|
|
@@ -9399,7 +9435,7 @@ export module '@theia/plugin' {
|
|
|
9399
9435
|
*
|
|
9400
9436
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9401
9437
|
* @param provider A document link provider.
|
|
9402
|
-
* @return A
|
|
9438
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9403
9439
|
*/
|
|
9404
9440
|
export function registerDocumentLinkProvider(selector: DocumentSelector, provider: DocumentLinkProvider): Disposable;
|
|
9405
9441
|
|
|
@@ -9412,7 +9448,7 @@ export module '@theia/plugin' {
|
|
|
9412
9448
|
*
|
|
9413
9449
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9414
9450
|
* @param provider A reference provider.
|
|
9415
|
-
* @return A
|
|
9451
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9416
9452
|
*/
|
|
9417
9453
|
export function registerReferenceProvider(selector: DocumentSelector, provider: ReferenceProvider): Disposable;
|
|
9418
9454
|
|
|
@@ -9440,7 +9476,7 @@ export module '@theia/plugin' {
|
|
|
9440
9476
|
*
|
|
9441
9477
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9442
9478
|
* @param provider A color provider.
|
|
9443
|
-
* @return A
|
|
9479
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9444
9480
|
*/
|
|
9445
9481
|
export function registerColorProvider(selector: DocumentSelector, provider: DocumentColorProvider): Disposable;
|
|
9446
9482
|
|
|
@@ -9457,7 +9493,7 @@ export module '@theia/plugin' {
|
|
|
9457
9493
|
*
|
|
9458
9494
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9459
9495
|
* @param provider A folding range provider.
|
|
9460
|
-
* @return A
|
|
9496
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9461
9497
|
*/
|
|
9462
9498
|
export function registerFoldingRangeProvider(selector: DocumentSelector, provider: FoldingRangeProvider): Disposable;
|
|
9463
9499
|
|
|
@@ -9470,7 +9506,7 @@ export module '@theia/plugin' {
|
|
|
9470
9506
|
*
|
|
9471
9507
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9472
9508
|
* @param provider A selection range provider.
|
|
9473
|
-
* @return A
|
|
9509
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9474
9510
|
*/
|
|
9475
9511
|
export function registerSelectionRangeProvider(selector: DocumentSelector, provider: SelectionRangeProvider): Disposable;
|
|
9476
9512
|
|
|
@@ -9478,12 +9514,12 @@ export module '@theia/plugin' {
|
|
|
9478
9514
|
* Register a reference provider.
|
|
9479
9515
|
*
|
|
9480
9516
|
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9481
|
-
* by their
|
|
9517
|
+
* by their {@link languages.match score} and the best-matching provider is used. Failure
|
|
9482
9518
|
* of the selected provider will cause a failure of the whole operation.
|
|
9483
9519
|
*
|
|
9484
9520
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9485
9521
|
* @param provider A rename provider.
|
|
9486
|
-
* @return A
|
|
9522
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9487
9523
|
*/
|
|
9488
9524
|
export function registerRenameProvider(selector: DocumentSelector, provider: RenameProvider): Disposable;
|
|
9489
9525
|
|
|
@@ -9491,12 +9527,12 @@ export module '@theia/plugin' {
|
|
|
9491
9527
|
* Register a semantic tokens provider for a whole document.
|
|
9492
9528
|
*
|
|
9493
9529
|
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9494
|
-
* by their
|
|
9530
|
+
* by their {@link languages.match score} and the best-matching provider is used. Failure
|
|
9495
9531
|
* of the selected provider will cause a failure of the whole operation.
|
|
9496
9532
|
*
|
|
9497
9533
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9498
9534
|
* @param provider A document semantic tokens provider.
|
|
9499
|
-
* @return A
|
|
9535
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9500
9536
|
*/
|
|
9501
9537
|
export function registerDocumentSemanticTokensProvider(selector: DocumentSelector, provider: DocumentSemanticTokensProvider, legend: SemanticTokensLegend): Disposable;
|
|
9502
9538
|
|
|
@@ -9510,12 +9546,12 @@ export module '@theia/plugin' {
|
|
|
9510
9546
|
* will be used.
|
|
9511
9547
|
*
|
|
9512
9548
|
* Multiple providers can be registered for a language. In that case providers are sorted
|
|
9513
|
-
* by their
|
|
9549
|
+
* by their {@link languages.match score} and the best-matching provider is used. Failure
|
|
9514
9550
|
* of the selected provider will cause a failure of the whole operation.
|
|
9515
9551
|
*
|
|
9516
9552
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9517
9553
|
* @param provider A document range semantic tokens provider.
|
|
9518
|
-
* @return A
|
|
9554
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9519
9555
|
*/
|
|
9520
9556
|
export function registerDocumentRangeSemanticTokensProvider(selector: DocumentSelector, provider: DocumentRangeSemanticTokensProvider, legend: SemanticTokensLegend): Disposable;
|
|
9521
9557
|
|
|
@@ -9528,7 +9564,7 @@ export module '@theia/plugin' {
|
|
|
9528
9564
|
*
|
|
9529
9565
|
* @param selector A selector that defines the documents this provider is applicable to.
|
|
9530
9566
|
* @param service A call hierarchy provider.
|
|
9531
|
-
* @return A
|
|
9567
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
9532
9568
|
*/
|
|
9533
9569
|
export function registerCallHierarchyProvider(selector: DocumentSelector, provider: CallHierarchyProvider): Disposable;
|
|
9534
9570
|
|
|
@@ -9563,7 +9599,7 @@ export module '@theia/plugin' {
|
|
|
9563
9599
|
/**
|
|
9564
9600
|
* The contents of this hover.
|
|
9565
9601
|
*/
|
|
9566
|
-
contents: MarkedString
|
|
9602
|
+
contents: Array<MarkdownString | MarkedString>;
|
|
9567
9603
|
|
|
9568
9604
|
/**
|
|
9569
9605
|
* The range to which this hover applies. When missing, the
|
|
@@ -9683,7 +9719,7 @@ export module '@theia/plugin' {
|
|
|
9683
9719
|
range: Range;
|
|
9684
9720
|
|
|
9685
9721
|
/**
|
|
9686
|
-
* The highlight kind, default is
|
|
9722
|
+
* The highlight kind, default is {@link DocumentHighlightKind.Text text}.
|
|
9687
9723
|
*/
|
|
9688
9724
|
kind?: DocumentHighlightKind;
|
|
9689
9725
|
|
|
@@ -9691,7 +9727,7 @@ export module '@theia/plugin' {
|
|
|
9691
9727
|
* Creates a new document highlight object.
|
|
9692
9728
|
*
|
|
9693
9729
|
* @param range The range the highlight applies to.
|
|
9694
|
-
* @param kind The highlight kind, default is
|
|
9730
|
+
* @param kind The highlight kind, default is {@link DocumentHighlightKind.Text text}.
|
|
9695
9731
|
*/
|
|
9696
9732
|
constructor(range: Range, kind?: DocumentHighlightKind);
|
|
9697
9733
|
}
|
|
@@ -9739,7 +9775,7 @@ export module '@theia/plugin' {
|
|
|
9739
9775
|
interface QuickDiffProvider {
|
|
9740
9776
|
|
|
9741
9777
|
/**
|
|
9742
|
-
* Provide a
|
|
9778
|
+
* Provide a {@link Uri uri} to the original resource of any given resource uri.
|
|
9743
9779
|
*
|
|
9744
9780
|
* @param uri The uri of the resource open in a text editor.
|
|
9745
9781
|
* @param token A cancellation token.
|
|
@@ -9750,38 +9786,38 @@ export module '@theia/plugin' {
|
|
|
9750
9786
|
|
|
9751
9787
|
/**
|
|
9752
9788
|
* The theme-aware decorations for a
|
|
9753
|
-
*
|
|
9789
|
+
* {@link SourceControlResourceState source control resource state}.
|
|
9754
9790
|
*/
|
|
9755
9791
|
export interface SourceControlResourceThemableDecorations {
|
|
9756
9792
|
|
|
9757
9793
|
/**
|
|
9758
9794
|
* The icon path for a specific
|
|
9759
|
-
*
|
|
9795
|
+
* {@link SourceControlResourceState source control resource state}.
|
|
9760
9796
|
*/
|
|
9761
9797
|
readonly iconPath?: string | Uri;
|
|
9762
9798
|
}
|
|
9763
9799
|
|
|
9764
9800
|
/**
|
|
9765
|
-
* The decorations for a
|
|
9801
|
+
* The decorations for a {@link SourceControlResourceState source control resource state}.
|
|
9766
9802
|
* Can be independently specified for light and dark themes.
|
|
9767
9803
|
*/
|
|
9768
9804
|
export interface SourceControlResourceDecorations extends SourceControlResourceThemableDecorations {
|
|
9769
9805
|
|
|
9770
9806
|
/**
|
|
9771
|
-
* Whether the
|
|
9807
|
+
* Whether the {@link SourceControlResourceState source control resource state} should
|
|
9772
9808
|
* be striked-through in the UI.
|
|
9773
9809
|
*/
|
|
9774
9810
|
readonly strikeThrough?: boolean;
|
|
9775
9811
|
|
|
9776
9812
|
/**
|
|
9777
|
-
* Whether the
|
|
9813
|
+
* Whether the {@link SourceControlResourceState source control resource state} should
|
|
9778
9814
|
* be faded in the UI.
|
|
9779
9815
|
*/
|
|
9780
9816
|
readonly faded?: boolean;
|
|
9781
9817
|
|
|
9782
9818
|
/**
|
|
9783
9819
|
* The title for a specific
|
|
9784
|
-
*
|
|
9820
|
+
* {@link SourceControlResourceState source control resource state}.
|
|
9785
9821
|
*/
|
|
9786
9822
|
readonly tooltip?: string;
|
|
9787
9823
|
|
|
@@ -9798,23 +9834,23 @@ export module '@theia/plugin' {
|
|
|
9798
9834
|
|
|
9799
9835
|
/**
|
|
9800
9836
|
* An source control resource state represents the state of an underlying workspace
|
|
9801
|
-
* resource within a certain
|
|
9837
|
+
* resource within a certain {@link SourceControlResourceGroup source control group}.
|
|
9802
9838
|
*/
|
|
9803
9839
|
export interface SourceControlResourceState {
|
|
9804
9840
|
|
|
9805
9841
|
/**
|
|
9806
|
-
* The
|
|
9842
|
+
* The {@link Uri uri} of the underlying resource inside the workspace.
|
|
9807
9843
|
*/
|
|
9808
9844
|
readonly resourceUri: Uri;
|
|
9809
9845
|
|
|
9810
9846
|
/**
|
|
9811
|
-
* The
|
|
9847
|
+
* The {@link Command command} which should be run when the resource
|
|
9812
9848
|
* state is open in the Source Control viewlet.
|
|
9813
9849
|
*/
|
|
9814
9850
|
readonly command?: Command;
|
|
9815
9851
|
|
|
9816
9852
|
/**
|
|
9817
|
-
* The
|
|
9853
|
+
* The {@link SourceControlResourceDecorations decorations} for this source control
|
|
9818
9854
|
* resource state.
|
|
9819
9855
|
*/
|
|
9820
9856
|
readonly decorations?: SourceControlResourceDecorations;
|
|
@@ -9842,7 +9878,7 @@ export module '@theia/plugin' {
|
|
|
9842
9878
|
|
|
9843
9879
|
/**
|
|
9844
9880
|
* A source control resource group is a collection of
|
|
9845
|
-
*
|
|
9881
|
+
* {@link SourceControlResourceState source control resource states}.
|
|
9846
9882
|
*/
|
|
9847
9883
|
export interface SourceControlResourceGroup {
|
|
9848
9884
|
|
|
@@ -9858,13 +9894,13 @@ export module '@theia/plugin' {
|
|
|
9858
9894
|
|
|
9859
9895
|
/**
|
|
9860
9896
|
* Whether this source control resource group is hidden when it contains
|
|
9861
|
-
* no
|
|
9897
|
+
* no {@link SourceControlResourceState source control resource states}.
|
|
9862
9898
|
*/
|
|
9863
9899
|
hideWhenEmpty?: boolean;
|
|
9864
9900
|
|
|
9865
9901
|
/**
|
|
9866
9902
|
* This group's collection of
|
|
9867
|
-
*
|
|
9903
|
+
* {@link SourceControlResourceState source control resource states}.
|
|
9868
9904
|
*/
|
|
9869
9905
|
resourceStates: SourceControlResourceState[];
|
|
9870
9906
|
|
|
@@ -9875,7 +9911,7 @@ export module '@theia/plugin' {
|
|
|
9875
9911
|
}
|
|
9876
9912
|
|
|
9877
9913
|
/**
|
|
9878
|
-
* An source control is able to provide
|
|
9914
|
+
* An source control is able to provide {@link SourceControlResourceState resource states}
|
|
9879
9915
|
* to the editor and interact with the editor in several source control related ways.
|
|
9880
9916
|
*/
|
|
9881
9917
|
export interface SourceControl {
|
|
@@ -9896,21 +9932,21 @@ export module '@theia/plugin' {
|
|
|
9896
9932
|
readonly rootUri: Uri | undefined;
|
|
9897
9933
|
|
|
9898
9934
|
/**
|
|
9899
|
-
* The
|
|
9935
|
+
* The {@link SourceControlInputBox input box} for this source control.
|
|
9900
9936
|
*/
|
|
9901
9937
|
readonly inputBox: SourceControlInputBox;
|
|
9902
9938
|
|
|
9903
9939
|
/**
|
|
9904
|
-
* The UI-visible count of
|
|
9940
|
+
* The UI-visible count of {@link SourceControlResourceState resource states} of
|
|
9905
9941
|
* this source control.
|
|
9906
9942
|
*
|
|
9907
|
-
* Equals to the total number of
|
|
9943
|
+
* Equals to the total number of {@link SourceControlResourceState resource state}
|
|
9908
9944
|
* of this source control, if undefined.
|
|
9909
9945
|
*/
|
|
9910
9946
|
count?: number;
|
|
9911
9947
|
|
|
9912
9948
|
/**
|
|
9913
|
-
* An optional
|
|
9949
|
+
* An optional {@link QuickDiffProvider quick diff provider}.
|
|
9914
9950
|
*/
|
|
9915
9951
|
quickDiffProvider?: QuickDiffProvider;
|
|
9916
9952
|
|
|
@@ -9938,7 +9974,7 @@ export module '@theia/plugin' {
|
|
|
9938
9974
|
statusBarCommands?: Command[];
|
|
9939
9975
|
|
|
9940
9976
|
/**
|
|
9941
|
-
* Create a new
|
|
9977
|
+
* Create a new {@link SourceControlResourceGroup resource group}.
|
|
9942
9978
|
*/
|
|
9943
9979
|
createResourceGroup(id: string, label: string): SourceControlResourceGroup;
|
|
9944
9980
|
|
|
@@ -9951,7 +9987,7 @@ export module '@theia/plugin' {
|
|
|
9951
9987
|
export namespace scm {
|
|
9952
9988
|
|
|
9953
9989
|
/**
|
|
9954
|
-
* ~~The
|
|
9990
|
+
* ~~The {@link SourceControlInputBox input box} for the last source control
|
|
9955
9991
|
* created by the extension.~~
|
|
9956
9992
|
*
|
|
9957
9993
|
* @deprecated Use SourceControl.inputBox instead
|
|
@@ -9959,12 +9995,12 @@ export module '@theia/plugin' {
|
|
|
9959
9995
|
export const inputBox: SourceControlInputBox;
|
|
9960
9996
|
|
|
9961
9997
|
/**
|
|
9962
|
-
* Creates a new
|
|
9998
|
+
* Creates a new {@link SourceControl source control} instance.
|
|
9963
9999
|
*
|
|
9964
10000
|
* @param id An `id` for the source control. Something short, eg: `git`.
|
|
9965
10001
|
* @param label A human-readable string for the source control. Eg: `Git`.
|
|
9966
10002
|
* @param rootUri An optional Uri of the root of the source control. Eg: `Uri.parse(workspaceRoot)`.
|
|
9967
|
-
* @return An instance of
|
|
10003
|
+
* @return An instance of {@link SourceControl source control}.
|
|
9968
10004
|
*/
|
|
9969
10005
|
export function createSourceControl(id: string, label: string, rootUri?: Uri): SourceControl;
|
|
9970
10006
|
}
|
|
@@ -10026,12 +10062,12 @@ export module '@theia/plugin' {
|
|
|
10026
10062
|
readonly id: string;
|
|
10027
10063
|
|
|
10028
10064
|
/**
|
|
10029
|
-
* The debug session's type from the
|
|
10065
|
+
* The debug session's type from the {@link DebugConfiguration debug configuration}.
|
|
10030
10066
|
*/
|
|
10031
10067
|
readonly type: string;
|
|
10032
10068
|
|
|
10033
10069
|
/**
|
|
10034
|
-
* The debug session's name from the
|
|
10070
|
+
* The debug session's name from the {@link DebugConfiguration debug configuration}.
|
|
10035
10071
|
*/
|
|
10036
10072
|
readonly name: string;
|
|
10037
10073
|
|
|
@@ -10041,7 +10077,7 @@ export module '@theia/plugin' {
|
|
|
10041
10077
|
readonly workspaceFolder: WorkspaceFolder | undefined;
|
|
10042
10078
|
|
|
10043
10079
|
/**
|
|
10044
|
-
* The "resolved"
|
|
10080
|
+
* The "resolved" {@link DebugConfiguration debug configuration} of this session.
|
|
10045
10081
|
*/
|
|
10046
10082
|
readonly configuration: DebugConfiguration;
|
|
10047
10083
|
|
|
@@ -10061,23 +10097,23 @@ export module '@theia/plugin' {
|
|
|
10061
10097
|
}
|
|
10062
10098
|
|
|
10063
10099
|
/**
|
|
10064
|
-
* A custom Debug Adapter Protocol event received from a
|
|
10100
|
+
* A custom Debug Adapter Protocol event received from a {@link DebugSession debug session}.
|
|
10065
10101
|
*/
|
|
10066
10102
|
export interface DebugSessionCustomEvent {
|
|
10067
10103
|
/**
|
|
10068
|
-
* The
|
|
10104
|
+
* The {@link DebugSession debug session} for which the custom event was received.
|
|
10069
10105
|
*/
|
|
10070
|
-
session: DebugSession;
|
|
10106
|
+
readonly session: DebugSession;
|
|
10071
10107
|
|
|
10072
10108
|
/**
|
|
10073
10109
|
* Type of event.
|
|
10074
10110
|
*/
|
|
10075
|
-
event: string;
|
|
10111
|
+
readonly event: string;
|
|
10076
10112
|
|
|
10077
10113
|
/**
|
|
10078
10114
|
* Event specific information.
|
|
10079
10115
|
*/
|
|
10080
|
-
body?: any;
|
|
10116
|
+
readonly body?: any;
|
|
10081
10117
|
}
|
|
10082
10118
|
|
|
10083
10119
|
/**
|
|
@@ -10119,7 +10155,7 @@ export module '@theia/plugin' {
|
|
|
10119
10155
|
*/
|
|
10120
10156
|
export interface DebugConfigurationProvider {
|
|
10121
10157
|
/**
|
|
10122
|
-
* Provides initial
|
|
10158
|
+
* Provides initial {@link DebugConfiguration debug configuration}. If more than one debug configuration provider is
|
|
10123
10159
|
* registered for the same type, debug configurations are concatenated in arbitrary order.
|
|
10124
10160
|
*
|
|
10125
10161
|
* @param folder The workspace folder for which the configurations are used or undefined for a folderless setup.
|
|
@@ -10129,14 +10165,14 @@ export module '@theia/plugin' {
|
|
|
10129
10165
|
provideDebugConfigurations?(folder: WorkspaceFolder | undefined, token?: CancellationToken): ProviderResult<DebugConfiguration[]>;
|
|
10130
10166
|
|
|
10131
10167
|
/**
|
|
10132
|
-
* Resolves a
|
|
10168
|
+
* Resolves a {@link DebugConfiguration debug configuration} by filling in missing values or by adding/changing/removing attributes.
|
|
10133
10169
|
* If more than one debug configuration provider is registered for the same type, the resolveDebugConfiguration calls are chained
|
|
10134
10170
|
* in arbitrary order and the initial debug configuration is piped through the chain.
|
|
10135
10171
|
* Returning the value 'undefined' prevents the debug session from starting.
|
|
10136
10172
|
* Returning the value 'null' prevents the debug session from starting and opens the underlying debug configuration instead.
|
|
10137
10173
|
*
|
|
10138
10174
|
* @param folder The workspace folder from which the configuration originates from or undefined for a folderless setup.
|
|
10139
|
-
* @param debugConfiguration The
|
|
10175
|
+
* @param debugConfiguration The {@link DebugConfiguration debug configuration} to resolve.
|
|
10140
10176
|
* @param token A cancellation token.
|
|
10141
10177
|
* @return The resolved debug configuration or undefined or null.
|
|
10142
10178
|
*/
|
|
@@ -10144,14 +10180,14 @@ export module '@theia/plugin' {
|
|
|
10144
10180
|
|
|
10145
10181
|
/**
|
|
10146
10182
|
* This hook is directly called after 'resolveDebugConfiguration' but with all variables substituted.
|
|
10147
|
-
* It can be used to resolve or verify a
|
|
10183
|
+
* It can be used to resolve or verify a {@link DebugConfiguration debug configuration} by filling in missing values or by adding/changing/removing attributes.
|
|
10148
10184
|
* If more than one debug configuration provider is registered for the same type, the 'resolveDebugConfigurationWithSubstitutedVariables' calls are chained
|
|
10149
10185
|
* in arbitrary order and the initial debug configuration is piped through the chain.
|
|
10150
10186
|
* Returning the value 'undefined' prevents the debug session from starting.
|
|
10151
10187
|
* Returning the value 'null' prevents the debug session from starting and opens the underlying debug configuration instead.
|
|
10152
10188
|
*
|
|
10153
10189
|
* @param folder The workspace folder from which the configuration originates from or `undefined` for a folderless setup.
|
|
10154
|
-
* @param debugConfiguration The
|
|
10190
|
+
* @param debugConfiguration The {@link DebugConfiguration debug configuration} to resolve.
|
|
10155
10191
|
* @param token A cancellation token.
|
|
10156
10192
|
* @return The resolved debug configuration or undefined or null.
|
|
10157
10193
|
*/
|
|
@@ -10193,8 +10229,8 @@ export module '@theia/plugin' {
|
|
|
10193
10229
|
* The method 'createDebugAdapterTracker' is called at the start of a debug session in order
|
|
10194
10230
|
* to return a "tracker" object that provides read-access to the communication between VS Code and a debug adapter.
|
|
10195
10231
|
*
|
|
10196
|
-
* @param session The
|
|
10197
|
-
* @return A
|
|
10232
|
+
* @param session The {@link DebugSession debug session} for which the debug adapter tracker will be used.
|
|
10233
|
+
* @return A {@link DebugAdapterTracker debug adapter tracker} or undefined.
|
|
10198
10234
|
*/
|
|
10199
10235
|
createDebugAdapterTracker(session: DebugSession): ProviderResult<DebugAdapterTracker>;
|
|
10200
10236
|
}
|
|
@@ -10322,10 +10358,10 @@ export module '@theia/plugin' {
|
|
|
10322
10358
|
export interface DebugAdapterDescriptorFactory {
|
|
10323
10359
|
/**
|
|
10324
10360
|
* 'createDebugAdapterDescriptor' is called at the start of a debug session to provide details about the debug adapter to use.
|
|
10325
|
-
* These details must be returned as objects of type
|
|
10361
|
+
* These details must be returned as objects of type {@link DebugAdapterDescriptor DebugAdapterDescriptor}.
|
|
10326
10362
|
* Currently two types of debug adapters are supported:
|
|
10327
|
-
* - a debug adapter executable is specified as a command path and arguments (see
|
|
10328
|
-
* - a debug adapter server reachable via a communication port (see
|
|
10363
|
+
* - a debug adapter executable is specified as a command path and arguments (see {@link DebugAdapterExecutable DebugAdapterExecutable}),
|
|
10364
|
+
* - a debug adapter server reachable via a communication port (see {@link DebugAdapterServer DebugAdapterServer}).
|
|
10329
10365
|
* If the method is not implemented the default behavior is this:
|
|
10330
10366
|
* createDebugAdapter(session: DebugSession, executable: DebugAdapterExecutable) {
|
|
10331
10367
|
* if (typeof session.configuration.debugServer === 'number') {
|
|
@@ -10333,9 +10369,9 @@ export module '@theia/plugin' {
|
|
|
10333
10369
|
* }
|
|
10334
10370
|
* return executable;
|
|
10335
10371
|
* }
|
|
10336
|
-
* @param session The
|
|
10372
|
+
* @param session The {@link DebugSession debug session} for which the debug adapter will be used.
|
|
10337
10373
|
* @param executable The debug adapter's executable information as specified in the package.json (or undefined if no such information exists).
|
|
10338
|
-
* @return a
|
|
10374
|
+
* @return a {@link DebugAdapterDescriptor debug adapter descriptor} or undefined.
|
|
10339
10375
|
*/
|
|
10340
10376
|
createDebugAdapterDescriptor(session: DebugSession, executable: DebugAdapterExecutable | undefined): ProviderResult<DebugAdapterDescriptor>;
|
|
10341
10377
|
}
|
|
@@ -10377,23 +10413,23 @@ export module '@theia/plugin' {
|
|
|
10377
10413
|
}
|
|
10378
10414
|
|
|
10379
10415
|
/**
|
|
10380
|
-
* An event describing the changes to the set of
|
|
10416
|
+
* An event describing the changes to the set of {@link Breakpoint breakpoints}.
|
|
10381
10417
|
*/
|
|
10382
10418
|
export interface BreakpointsChangeEvent {
|
|
10383
10419
|
/**
|
|
10384
10420
|
* Added breakpoints.
|
|
10385
10421
|
*/
|
|
10386
|
-
readonly added: Breakpoint[];
|
|
10422
|
+
readonly added: readonly Breakpoint[];
|
|
10387
10423
|
|
|
10388
10424
|
/**
|
|
10389
10425
|
* Removed breakpoints.
|
|
10390
10426
|
*/
|
|
10391
|
-
readonly removed: Breakpoint[];
|
|
10427
|
+
readonly removed: readonly Breakpoint[];
|
|
10392
10428
|
|
|
10393
10429
|
/**
|
|
10394
10430
|
* Changed breakpoints.
|
|
10395
10431
|
*/
|
|
10396
|
-
readonly changed: Breakpoint[];
|
|
10432
|
+
readonly changed: readonly Breakpoint[];
|
|
10397
10433
|
}
|
|
10398
10434
|
|
|
10399
10435
|
/**
|
|
@@ -10479,57 +10515,57 @@ export module '@theia/plugin' {
|
|
|
10479
10515
|
export namespace debug {
|
|
10480
10516
|
|
|
10481
10517
|
/**
|
|
10482
|
-
* The currently active
|
|
10518
|
+
* The currently active {@link DebugSession debug session} or `undefined`. The active debug session is the one
|
|
10483
10519
|
* represented by the debug action floating window or the one currently shown in the drop down menu of the debug action floating window.
|
|
10484
10520
|
* If no debug session is active, the value is `undefined`.
|
|
10485
10521
|
*/
|
|
10486
10522
|
export let activeDebugSession: DebugSession | undefined;
|
|
10487
10523
|
|
|
10488
10524
|
/**
|
|
10489
|
-
* The currently active
|
|
10525
|
+
* The currently active {@link DebugConsole debug console}.
|
|
10490
10526
|
*/
|
|
10491
10527
|
export let activeDebugConsole: DebugConsole;
|
|
10492
10528
|
|
|
10493
10529
|
/**
|
|
10494
10530
|
* List of breakpoints.
|
|
10495
10531
|
*/
|
|
10496
|
-
export let breakpoints: Breakpoint[];
|
|
10532
|
+
export let breakpoints: readonly Breakpoint[];
|
|
10497
10533
|
|
|
10498
10534
|
/**
|
|
10499
|
-
* An
|
|
10535
|
+
* An {@link Event event} which fires when the {@link debug.activeDebugSession active debug session}
|
|
10500
10536
|
* has changed. *Note* that the event also fires when the active debug session changes
|
|
10501
10537
|
* to `undefined`.
|
|
10502
10538
|
*/
|
|
10503
10539
|
export const onDidChangeActiveDebugSession: Event<DebugSession | undefined>;
|
|
10504
10540
|
|
|
10505
10541
|
/**
|
|
10506
|
-
* An
|
|
10542
|
+
* An {@link Event event} which fires when a new {@link DebugSession debug session} has been started.
|
|
10507
10543
|
*/
|
|
10508
10544
|
export const onDidStartDebugSession: Event<DebugSession>;
|
|
10509
10545
|
|
|
10510
10546
|
/**
|
|
10511
|
-
* An
|
|
10547
|
+
* An {@link Event event} which fires when a custom DAP event is received from the {@link DebugSession debug session}.
|
|
10512
10548
|
*/
|
|
10513
10549
|
export const onDidReceiveDebugSessionCustomEvent: Event<DebugSessionCustomEvent>;
|
|
10514
10550
|
|
|
10515
10551
|
/**
|
|
10516
|
-
* An
|
|
10552
|
+
* An {@link Event event} which fires when a {@link DebugSession debug session} has terminated.
|
|
10517
10553
|
*/
|
|
10518
10554
|
export const onDidTerminateDebugSession: Event<DebugSession>;
|
|
10519
10555
|
|
|
10520
10556
|
/**
|
|
10521
|
-
* An
|
|
10557
|
+
* An {@link Event event} that is emitted when the set of breakpoints is added, removed, or changed.
|
|
10522
10558
|
*/
|
|
10523
10559
|
export const onDidChangeBreakpoints: Event<BreakpointsChangeEvent>;
|
|
10524
10560
|
|
|
10525
10561
|
/**
|
|
10526
|
-
* Register a
|
|
10562
|
+
* Register a {@link DebugAdapterDescriptorFactory debug adapter descriptor factory} for a specific debug type.
|
|
10527
10563
|
* An extension is only allowed to register a DebugAdapterDescriptorFactory for the debug type(s) defined by the extension. Otherwise an error is thrown.
|
|
10528
10564
|
* Registering more than one DebugAdapterDescriptorFactory for a debug type results in an error.
|
|
10529
10565
|
*
|
|
10530
10566
|
* @param debugType The debug type for which the factory is registered.
|
|
10531
|
-
* @param factory The
|
|
10532
|
-
* @return A
|
|
10567
|
+
* @param factory The {@link DebugAdapterDescriptorFactory debug adapter descriptor factory} to register.
|
|
10568
|
+
* @return A {@link Disposable disposable} that unregisters this factory when being disposed.
|
|
10533
10569
|
*/
|
|
10534
10570
|
export function registerDebugAdapterDescriptorFactory(debugType: string, factory: DebugAdapterDescriptorFactory): Disposable;
|
|
10535
10571
|
|
|
@@ -10564,19 +10600,19 @@ export module '@theia/plugin' {
|
|
|
10564
10600
|
* Register a debug adapter tracker factory for the given debug type.
|
|
10565
10601
|
*
|
|
10566
10602
|
* @param debugType The debug type for which the factory is registered or '*' for matching all debug types.
|
|
10567
|
-
* @param factory The
|
|
10568
|
-
* @return A
|
|
10603
|
+
* @param factory The {@link DebugAdapterTrackerFactory debug adapter tracker factory} to register.
|
|
10604
|
+
* @return A {@link Disposable disposable} that unregisters this factory when being disposed.
|
|
10569
10605
|
*/
|
|
10570
10606
|
export function registerDebugAdapterTrackerFactory(debugType: string, factory: DebugAdapterTrackerFactory): Disposable;
|
|
10571
10607
|
|
|
10572
10608
|
/**
|
|
10573
10609
|
* Start debugging by using either a named launch or named compound configuration,
|
|
10574
|
-
* or by directly passing a
|
|
10610
|
+
* or by directly passing a {@link DebugConfiguration DebugConfiguration}.
|
|
10575
10611
|
* The named configurations are looked up in '.vscode/launch.json' found in the given folder.
|
|
10576
10612
|
* Before debugging starts, all unsaved files are saved and the launch configurations are brought up-to-date.
|
|
10577
10613
|
* Folder specific variables used in the configuration (e.g. '${workspaceFolder}') are resolved against the given folder.
|
|
10578
|
-
* @param folder The
|
|
10579
|
-
* @param nameOrConfiguration Either the name of a debug or compound configuration or a
|
|
10614
|
+
* @param folder The {@link WorkspaceFolder workspace folder} for looking up named configurations and resolving variables or `undefined` for a non-folder setup.
|
|
10615
|
+
* @param nameOrConfiguration Either the name of a debug or compound configuration or a {@link DebugConfiguration DebugConfiguration} object.
|
|
10580
10616
|
* @param parentSessionOrOptions Debug session options. When passed a parent debug session, assumes options with just this parent session.
|
|
10581
10617
|
* @return A thenable that resolves when debugging could be successfully started.
|
|
10582
10618
|
*/
|
|
@@ -10584,7 +10620,7 @@ export module '@theia/plugin' {
|
|
|
10584
10620
|
|
|
10585
10621
|
/**
|
|
10586
10622
|
* Stop the given debug session or stop all debug sessions if session is omitted.
|
|
10587
|
-
* @param session The
|
|
10623
|
+
* @param session The {@link DebugSession debug session} to stop; if omitted all sessions are stopped.
|
|
10588
10624
|
*/
|
|
10589
10625
|
export function stopDebugging(session?: DebugSession): Thenable<void>;
|
|
10590
10626
|
|
|
@@ -10604,31 +10640,31 @@ export module '@theia/plugin' {
|
|
|
10604
10640
|
}
|
|
10605
10641
|
|
|
10606
10642
|
/**
|
|
10607
|
-
* Represents options to configure the behavior of showing a
|
|
10643
|
+
* Represents options to configure the behavior of showing a {@link TextDocument document} in an {@link TextEditor editor}.
|
|
10608
10644
|
*/
|
|
10609
10645
|
export interface TextDocumentShowOptions {
|
|
10610
10646
|
/**
|
|
10611
|
-
* An optional view column in which the
|
|
10612
|
-
* The default is the
|
|
10613
|
-
* be `Min(column, columnCount + 1)`, the
|
|
10647
|
+
* An optional view column in which the {@link TextEditor editor} should be shown.
|
|
10648
|
+
* The default is the {@link ViewColumn.Active active}, other values are adjusted to
|
|
10649
|
+
* be `Min(column, columnCount + 1)`, the {@link ViewColumn.Active active}-column is
|
|
10614
10650
|
* not adjusted. Use [`ViewColumn.Beside`](#ViewColumn.Beside) to open the
|
|
10615
10651
|
* editor to the side of the currently active one.
|
|
10616
10652
|
*/
|
|
10617
10653
|
viewColumn?: ViewColumn;
|
|
10618
10654
|
|
|
10619
10655
|
/**
|
|
10620
|
-
* An optional flag that when `true` will stop the
|
|
10656
|
+
* An optional flag that when `true` will stop the {@link TextEditor editor} from taking focus.
|
|
10621
10657
|
*/
|
|
10622
10658
|
preserveFocus?: boolean;
|
|
10623
10659
|
|
|
10624
10660
|
/**
|
|
10625
|
-
* An optional flag that controls if an
|
|
10661
|
+
* An optional flag that controls if an {@link TextEditor editor}-tab will be replaced
|
|
10626
10662
|
* with the next editor or if it will be kept.
|
|
10627
10663
|
*/
|
|
10628
10664
|
preview?: boolean;
|
|
10629
10665
|
|
|
10630
10666
|
/**
|
|
10631
|
-
* An optional selection to apply for the document in the
|
|
10667
|
+
* An optional selection to apply for the document in the {@link TextEditor editor}.
|
|
10632
10668
|
*/
|
|
10633
10669
|
selection?: Range;
|
|
10634
10670
|
}
|
|
@@ -10847,8 +10883,6 @@ export module '@theia/plugin' {
|
|
|
10847
10883
|
* were in the task definition will be resolved and passed into the callback as `resolvedDefinition`.
|
|
10848
10884
|
*/
|
|
10849
10885
|
constructor(callback: (resolvedDefinition: TaskDefinition) => Thenable<Pseudoterminal>);
|
|
10850
|
-
|
|
10851
|
-
readonly callback;
|
|
10852
10886
|
}
|
|
10853
10887
|
|
|
10854
10888
|
export enum TaskScope {
|
|
@@ -11078,7 +11112,7 @@ export module '@theia/plugin' {
|
|
|
11078
11112
|
/**
|
|
11079
11113
|
* The task item representing the task that got started.
|
|
11080
11114
|
*/
|
|
11081
|
-
execution: TaskExecution;
|
|
11115
|
+
readonly execution: TaskExecution;
|
|
11082
11116
|
}
|
|
11083
11117
|
|
|
11084
11118
|
/**
|
|
@@ -11090,7 +11124,7 @@ export module '@theia/plugin' {
|
|
|
11090
11124
|
/**
|
|
11091
11125
|
* The task item representing the task that finished.
|
|
11092
11126
|
*/
|
|
11093
|
-
execution: TaskExecution;
|
|
11127
|
+
readonly execution: TaskExecution;
|
|
11094
11128
|
}
|
|
11095
11129
|
|
|
11096
11130
|
/**
|
|
@@ -11101,7 +11135,7 @@ export module '@theia/plugin' {
|
|
|
11101
11135
|
/**
|
|
11102
11136
|
* The task execution for which the process got started.
|
|
11103
11137
|
*/
|
|
11104
|
-
execution: TaskExecution;
|
|
11138
|
+
readonly execution: TaskExecution;
|
|
11105
11139
|
|
|
11106
11140
|
/**
|
|
11107
11141
|
* The underlying process id.
|
|
@@ -11118,7 +11152,7 @@ export module '@theia/plugin' {
|
|
|
11118
11152
|
/**
|
|
11119
11153
|
* The task execution for which the process got started.
|
|
11120
11154
|
*/
|
|
11121
|
-
execution: TaskExecution;
|
|
11155
|
+
readonly execution: TaskExecution;
|
|
11122
11156
|
|
|
11123
11157
|
/**
|
|
11124
11158
|
* The process's exit code.
|
|
@@ -11146,7 +11180,7 @@ export module '@theia/plugin' {
|
|
|
11146
11180
|
*
|
|
11147
11181
|
* @param type The task kind type this provider is registered for.
|
|
11148
11182
|
* @param provider A task provider.
|
|
11149
|
-
* @return A
|
|
11183
|
+
* @return A {@link Disposable disposable} that unregisters this provider when being disposed.
|
|
11150
11184
|
*/
|
|
11151
11185
|
export function registerTaskProvider(type: string, provider: TaskProvider): Disposable;
|
|
11152
11186
|
|
|
@@ -11170,7 +11204,7 @@ export module '@theia/plugin' {
|
|
|
11170
11204
|
/**
|
|
11171
11205
|
* The currently active task executions or an empty array.
|
|
11172
11206
|
*/
|
|
11173
|
-
export const taskExecutions:
|
|
11207
|
+
export const taskExecutions: readonly TaskExecution[];
|
|
11174
11208
|
|
|
11175
11209
|
/** Fires when a task starts. */
|
|
11176
11210
|
export const onDidStartTask: Event<TaskStartEvent>;
|
|
@@ -11193,39 +11227,6 @@ export module '@theia/plugin' {
|
|
|
11193
11227
|
export const onDidEndTaskProcess: Event<TaskProcessEndEvent>;
|
|
11194
11228
|
}
|
|
11195
11229
|
|
|
11196
|
-
/**
|
|
11197
|
-
* A memento represents a storage utility. It can store and retrieve
|
|
11198
|
-
* values.
|
|
11199
|
-
*/
|
|
11200
|
-
export interface Memento {
|
|
11201
|
-
|
|
11202
|
-
/**
|
|
11203
|
-
* Return a value.
|
|
11204
|
-
*
|
|
11205
|
-
* @param key A string.
|
|
11206
|
-
* @return The stored value or `undefined`.
|
|
11207
|
-
*/
|
|
11208
|
-
get<T>(key: string): T | undefined;
|
|
11209
|
-
|
|
11210
|
-
/**
|
|
11211
|
-
* Return a value.
|
|
11212
|
-
*
|
|
11213
|
-
* @param key A string.
|
|
11214
|
-
* @param defaultValue A value that should be returned when there is no
|
|
11215
|
-
* value (`undefined`) with the given key.
|
|
11216
|
-
* @return The stored value or the defaultValue.
|
|
11217
|
-
*/
|
|
11218
|
-
get<T>(key: string, defaultValue: T): T;
|
|
11219
|
-
|
|
11220
|
-
/**
|
|
11221
|
-
* Store a value. The value must be JSON-stringifyable.
|
|
11222
|
-
*
|
|
11223
|
-
* @param key A string.
|
|
11224
|
-
* @param value A value. MUST not contain cyclic references.
|
|
11225
|
-
*/
|
|
11226
|
-
update(key: string, value: any): Thenable<void>;
|
|
11227
|
-
}
|
|
11228
|
-
|
|
11229
11230
|
/* The workspace symbol provider interface defines the contract between extensions
|
|
11230
11231
|
* and the [symbol search](https://code.visualstudio.com/docs/editor/intellisense)-feature.
|
|
11231
11232
|
*/
|
|
@@ -11252,7 +11253,7 @@ export module '@theia/plugin' {
|
|
|
11252
11253
|
provideWorkspaceSymbols(query: string, token: CancellationToken): ProviderResult<T[]>;
|
|
11253
11254
|
|
|
11254
11255
|
/**
|
|
11255
|
-
* Given a symbol fill in its
|
|
11256
|
+
* Given a symbol fill in its {@link SymbolInformation.location location}. This method is called whenever a symbol
|
|
11256
11257
|
* is selected in the UI. Providers can implement this method and return incomplete symbols from
|
|
11257
11258
|
* [`provideWorkspaceSymbols`](#WorkspaceSymbolProvider.provideWorkspaceSymbols) which often helps to improve
|
|
11258
11259
|
* performance.
|
|
@@ -11269,7 +11270,7 @@ export module '@theia/plugin' {
|
|
|
11269
11270
|
// #region Comments
|
|
11270
11271
|
|
|
11271
11272
|
/**
|
|
11272
|
-
* Collapsible state of a
|
|
11273
|
+
* Collapsible state of a {@link CommentThread comment thread}
|
|
11273
11274
|
*/
|
|
11274
11275
|
export enum CommentThreadCollapsibleState {
|
|
11275
11276
|
/**
|
|
@@ -11284,7 +11285,7 @@ export module '@theia/plugin' {
|
|
|
11284
11285
|
}
|
|
11285
11286
|
|
|
11286
11287
|
/**
|
|
11287
|
-
* Comment mode of a
|
|
11288
|
+
* Comment mode of a {@link Comment comment}
|
|
11288
11289
|
*/
|
|
11289
11290
|
export enum CommentMode {
|
|
11290
11291
|
/**
|
|
@@ -11299,7 +11300,7 @@ export module '@theia/plugin' {
|
|
|
11299
11300
|
}
|
|
11300
11301
|
|
|
11301
11302
|
/**
|
|
11302
|
-
* A collection of
|
|
11303
|
+
* A collection of {@link Comment comments} representing a conversation at a particular range in a document.
|
|
11303
11304
|
*/
|
|
11304
11305
|
export interface CommentThread {
|
|
11305
11306
|
/**
|
|
@@ -11345,7 +11346,7 @@ export module '@theia/plugin' {
|
|
|
11345
11346
|
contextValue?: string;
|
|
11346
11347
|
|
|
11347
11348
|
/**
|
|
11348
|
-
* The optional human-readable label describing the
|
|
11349
|
+
* The optional human-readable label describing the {@link CommentThread Comment Thread}
|
|
11349
11350
|
*/
|
|
11350
11351
|
label?: string;
|
|
11351
11352
|
|
|
@@ -11363,7 +11364,7 @@ export module '@theia/plugin' {
|
|
|
11363
11364
|
}
|
|
11364
11365
|
|
|
11365
11366
|
/**
|
|
11366
|
-
* Author information of a
|
|
11367
|
+
* Author information of a {@link Comment comment}
|
|
11367
11368
|
*/
|
|
11368
11369
|
export interface CommentAuthorInformation {
|
|
11369
11370
|
/**
|
|
@@ -11378,7 +11379,7 @@ export module '@theia/plugin' {
|
|
|
11378
11379
|
}
|
|
11379
11380
|
|
|
11380
11381
|
/**
|
|
11381
|
-
* Reactions of a
|
|
11382
|
+
* Reactions of a {@link Comment comment}
|
|
11382
11383
|
*/
|
|
11383
11384
|
export interface CommentReaction {
|
|
11384
11385
|
/**
|
|
@@ -11412,12 +11413,12 @@ export module '@theia/plugin' {
|
|
|
11412
11413
|
body: string | MarkdownString;
|
|
11413
11414
|
|
|
11414
11415
|
/**
|
|
11415
|
-
*
|
|
11416
|
+
* {@link CommentMode Comment mode} of the comment
|
|
11416
11417
|
*/
|
|
11417
11418
|
mode: CommentMode;
|
|
11418
11419
|
|
|
11419
11420
|
/**
|
|
11420
|
-
* The
|
|
11421
|
+
* The {@link CommentAuthorInformation author information} of the comment
|
|
11421
11422
|
*/
|
|
11422
11423
|
author: CommentAuthorInformation;
|
|
11423
11424
|
|
|
@@ -11442,12 +11443,12 @@ export module '@theia/plugin' {
|
|
|
11442
11443
|
contextValue?: string;
|
|
11443
11444
|
|
|
11444
11445
|
/**
|
|
11445
|
-
* Optional reactions of the
|
|
11446
|
+
* Optional reactions of the {@link Comment comment}
|
|
11446
11447
|
*/
|
|
11447
11448
|
reactions?: CommentReaction[];
|
|
11448
11449
|
|
|
11449
11450
|
/**
|
|
11450
|
-
* Optional label describing the
|
|
11451
|
+
* Optional label describing the {@link Comment Comment}
|
|
11451
11452
|
* Label will be rendered next to authorName if exists.
|
|
11452
11453
|
*/
|
|
11453
11454
|
label?: string;
|
|
@@ -11458,7 +11459,7 @@ export module '@theia/plugin' {
|
|
|
11458
11459
|
*/
|
|
11459
11460
|
export interface CommentReply {
|
|
11460
11461
|
/**
|
|
11461
|
-
* The active
|
|
11462
|
+
* The active {@link CommentThread comment thread}
|
|
11462
11463
|
*/
|
|
11463
11464
|
thread: CommentThread;
|
|
11464
11465
|
|
|
@@ -11469,7 +11470,7 @@ export module '@theia/plugin' {
|
|
|
11469
11470
|
}
|
|
11470
11471
|
|
|
11471
11472
|
/**
|
|
11472
|
-
* Commenting range provider for a
|
|
11473
|
+
* Commenting range provider for a {@link CommentController comment controller}.
|
|
11473
11474
|
*/
|
|
11474
11475
|
export interface CommentingRangeProvider {
|
|
11475
11476
|
/**
|
|
@@ -11479,7 +11480,7 @@ export module '@theia/plugin' {
|
|
|
11479
11480
|
}
|
|
11480
11481
|
|
|
11481
11482
|
/**
|
|
11482
|
-
* Represents a
|
|
11483
|
+
* Represents a {@link CommentController comment controller}'s {@link CommentController.options options}.
|
|
11483
11484
|
*/
|
|
11484
11485
|
export interface CommentOptions {
|
|
11485
11486
|
/**
|
|
@@ -11494,7 +11495,7 @@ export module '@theia/plugin' {
|
|
|
11494
11495
|
}
|
|
11495
11496
|
|
|
11496
11497
|
/**
|
|
11497
|
-
* A comment controller is able to provide
|
|
11498
|
+
* A comment controller is able to provide {@link CommentThread comments} support to the editor and
|
|
11498
11499
|
* provide users various ways to interact with comments.
|
|
11499
11500
|
*/
|
|
11500
11501
|
export interface CommentController {
|
|
@@ -11514,14 +11515,14 @@ export module '@theia/plugin' {
|
|
|
11514
11515
|
options?: CommentOptions;
|
|
11515
11516
|
|
|
11516
11517
|
/**
|
|
11517
|
-
* Optional commenting range provider. Provide a list
|
|
11518
|
+
* Optional commenting range provider. Provide a list {@link Range ranges} which support commenting to any given resource uri.
|
|
11518
11519
|
*
|
|
11519
11520
|
* If not provided, users can leave comments in any document opened in the editor.
|
|
11520
11521
|
*/
|
|
11521
11522
|
commentingRangeProvider?: CommentingRangeProvider;
|
|
11522
11523
|
|
|
11523
11524
|
/**
|
|
11524
|
-
* Create a
|
|
11525
|
+
* Create a {@link CommentThread comment thread}. The comment thread will be displayed in visible text editors (if the resource matches)
|
|
11525
11526
|
* and Comments Panel once created.
|
|
11526
11527
|
*
|
|
11527
11528
|
* @param uri The uri of the document the thread has been created on.
|
|
@@ -11531,14 +11532,14 @@ export module '@theia/plugin' {
|
|
|
11531
11532
|
createCommentThread(uri: Uri, range: Range, comments: Comment[]): CommentThread;
|
|
11532
11533
|
|
|
11533
11534
|
/**
|
|
11534
|
-
* Optional reaction handler for creating and deleting reactions on a
|
|
11535
|
+
* Optional reaction handler for creating and deleting reactions on a {@link Comment comment}.
|
|
11535
11536
|
*/
|
|
11536
|
-
reactionHandler?: (comment: Comment, reaction: CommentReaction) =>
|
|
11537
|
+
reactionHandler?: (comment: Comment, reaction: CommentReaction) => Thenable<void>;
|
|
11537
11538
|
|
|
11538
11539
|
/**
|
|
11539
11540
|
* Dispose this comment controller.
|
|
11540
11541
|
*
|
|
11541
|
-
* Once disposed, all
|
|
11542
|
+
* Once disposed, all {@link CommentThread comment threads} created by this comment controller will also be removed from the editor
|
|
11542
11543
|
* and Comments Panel.
|
|
11543
11544
|
*/
|
|
11544
11545
|
dispose(): void;
|
|
@@ -11546,11 +11547,11 @@ export module '@theia/plugin' {
|
|
|
11546
11547
|
|
|
11547
11548
|
namespace comments {
|
|
11548
11549
|
/**
|
|
11549
|
-
* Creates a new
|
|
11550
|
+
* Creates a new {@link CommentController comment controller} instance.
|
|
11550
11551
|
*
|
|
11551
11552
|
* @param id An `id` for the comment controller.
|
|
11552
11553
|
* @param label A human-readable string for the comment controller.
|
|
11553
|
-
* @return An instance of
|
|
11554
|
+
* @return An instance of {@link CommentController comment controller}.
|
|
11554
11555
|
*/
|
|
11555
11556
|
export function createCommentController(id: string, label: string): CommentController;
|
|
11556
11557
|
}
|
|
@@ -11564,7 +11565,7 @@ export module '@theia/plugin' {
|
|
|
11564
11565
|
export class SelectionRange {
|
|
11565
11566
|
|
|
11566
11567
|
/**
|
|
11567
|
-
* The
|
|
11568
|
+
* The {@link Range range} of this selection range.
|
|
11568
11569
|
*/
|
|
11569
11570
|
range: Range;
|
|
11570
11571
|
|
|
@@ -11588,7 +11589,7 @@ export module '@theia/plugin' {
|
|
|
11588
11589
|
*
|
|
11589
11590
|
* Selection ranges should be computed individually and independent for each position. The editor will merge
|
|
11590
11591
|
* and deduplicate ranges but providers must return hierarchies of selection ranges so that a range
|
|
11591
|
-
* is
|
|
11592
|
+
* is {@link Range.contains contained} by its parent.
|
|
11592
11593
|
*
|
|
11593
11594
|
* @param document The document in which the command was invoked.
|
|
11594
11595
|
* @param positions The positions at which the command was invoked.
|
|
@@ -11770,7 +11771,7 @@ export module '@theia/plugin' {
|
|
|
11770
11771
|
* An optional word pattern that describes valid contents for the given ranges.
|
|
11771
11772
|
* If no pattern is provided, the language configuration's word pattern will be used.
|
|
11772
11773
|
*/
|
|
11773
|
-
readonly wordPattern
|
|
11774
|
+
readonly wordPattern: RegExp | undefined;
|
|
11774
11775
|
}
|
|
11775
11776
|
|
|
11776
11777
|
/**
|
|
@@ -11813,13 +11814,13 @@ export module '@theia/plugin' {
|
|
|
11813
11814
|
|
|
11814
11815
|
/**
|
|
11815
11816
|
* The permissions granted by the session's access token. Available scopes
|
|
11816
|
-
* are defined by the
|
|
11817
|
+
* are defined by the {@link AuthenticationProvider AuthenticationProvider}.
|
|
11817
11818
|
*/
|
|
11818
|
-
readonly scopes:
|
|
11819
|
+
readonly scopes: readonly string[];
|
|
11819
11820
|
}
|
|
11820
11821
|
|
|
11821
11822
|
/**
|
|
11822
|
-
* The information of an account associated with an
|
|
11823
|
+
* The information of an account associated with an {@link AuthenticationSession AuthenticationSession}.
|
|
11823
11824
|
*/
|
|
11824
11825
|
export interface AuthenticationSessionAccountInformation {
|
|
11825
11826
|
/**
|
|
@@ -11834,7 +11835,7 @@ export module '@theia/plugin' {
|
|
|
11834
11835
|
}
|
|
11835
11836
|
|
|
11836
11837
|
/**
|
|
11837
|
-
* Options to be used when getting an
|
|
11838
|
+
* Options to be used when getting an {@link AuthenticationSession AuthenticationSession} from an {@link AuthenticationProvider AuthenticationProvider}.
|
|
11838
11839
|
*/
|
|
11839
11840
|
export interface AuthenticationGetSessionOptions {
|
|
11840
11841
|
/**
|
|
@@ -11852,8 +11853,8 @@ export module '@theia/plugin' {
|
|
|
11852
11853
|
* Whether the existing user session preference should be cleared.
|
|
11853
11854
|
*
|
|
11854
11855
|
* For authentication providers that support being signed into multiple accounts at once, the user will be
|
|
11855
|
-
* prompted to select an account to use when
|
|
11856
|
-
* is remembered until
|
|
11856
|
+
* prompted to select an account to use when {@link authentication.getSession getSession} is called. This preference
|
|
11857
|
+
* is remembered until {@link authentication.getSession getSession} is called with this flag.
|
|
11857
11858
|
*
|
|
11858
11859
|
* Defaults to false.
|
|
11859
11860
|
*/
|
|
@@ -11883,7 +11884,7 @@ export module '@theia/plugin' {
|
|
|
11883
11884
|
}
|
|
11884
11885
|
|
|
11885
11886
|
/**
|
|
11886
|
-
* Basic information about an
|
|
11887
|
+
* Basic information about an {@link AuthenticationProvider authenticationProvider}
|
|
11887
11888
|
*/
|
|
11888
11889
|
export interface AuthenticationProviderInformation {
|
|
11889
11890
|
/**
|
|
@@ -11898,11 +11899,11 @@ export module '@theia/plugin' {
|
|
|
11898
11899
|
}
|
|
11899
11900
|
|
|
11900
11901
|
/**
|
|
11901
|
-
* An
|
|
11902
|
+
* An {@link Event event} which fires when an {@link AuthenticationSession AuthenticationSession} is added, removed, or changed.
|
|
11902
11903
|
*/
|
|
11903
11904
|
export interface AuthenticationSessionsChangeEvent {
|
|
11904
11905
|
/**
|
|
11905
|
-
* The
|
|
11906
|
+
* The {@link AuthenticationProvider authenticationProvider} that has had its sessions change.
|
|
11906
11907
|
*/
|
|
11907
11908
|
readonly provider: AuthenticationProviderInformation;
|
|
11908
11909
|
}
|
|
@@ -11998,7 +11999,7 @@ export module '@theia/plugin' {
|
|
|
11998
11999
|
* to VS Code that implement GitHub and Microsoft authentication: their providerId's are 'github' and 'microsoft'.
|
|
11999
12000
|
* @param providerId The id of the provider to use
|
|
12000
12001
|
* @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
|
|
12001
|
-
* @param options The
|
|
12002
|
+
* @param options The {@link GetSessionOptions getSessionOptions} to use
|
|
12002
12003
|
* @returns A thenable that resolves to an authentication session
|
|
12003
12004
|
*/
|
|
12004
12005
|
export function getSession(providerId: string, scopes: readonly string[], options: AuthenticationGetSessionOptions & { createIfNone: true }): Thenable<AuthenticationSession>;
|
|
@@ -12026,13 +12027,13 @@ export module '@theia/plugin' {
|
|
|
12026
12027
|
*
|
|
12027
12028
|
* @param providerId The id of the provider to use
|
|
12028
12029
|
* @param scopes A list of scopes representing the permissions requested. These are dependent on the authentication provider
|
|
12029
|
-
* @param options The
|
|
12030
|
+
* @param options The {@link GetSessionOptions getSessionOptions} to use
|
|
12030
12031
|
* @returns A thenable that resolves to an authentication session if available, or undefined if there are no sessions
|
|
12031
12032
|
*/
|
|
12032
12033
|
export function getSession(providerId: string, scopes: readonly string[], options?: AuthenticationGetSessionOptions): Thenable<AuthenticationSession | undefined>;
|
|
12033
12034
|
|
|
12034
12035
|
/**
|
|
12035
|
-
* An
|
|
12036
|
+
* An {@link Event event} which fires when the authentication sessions of an authentication provider have
|
|
12036
12037
|
* been added, removed, or changed.
|
|
12037
12038
|
*/
|
|
12038
12039
|
export const onDidChangeSessions: Event<AuthenticationSessionsChangeEvent>;
|
|
@@ -12050,12 +12051,6 @@ export module '@theia/plugin' {
|
|
|
12050
12051
|
* @return A {@link Disposable} that unregisters this provider when being disposed.
|
|
12051
12052
|
*/
|
|
12052
12053
|
export function registerAuthenticationProvider(id: string, label: string, provider: AuthenticationProvider, options?: AuthenticationProviderOptions): Disposable;
|
|
12053
|
-
|
|
12054
|
-
/**
|
|
12055
|
-
* @deprecated Use {@link getSession()} {@link AuthenticationGetSessionOptions.silent} instead.
|
|
12056
|
-
*/
|
|
12057
|
-
export function hasSession(providerId: string, scopes: readonly string[]): Thenable<boolean>;
|
|
12058
|
-
|
|
12059
12054
|
}
|
|
12060
12055
|
}
|
|
12061
12056
|
|