@theia/plugin 1.30.0-next.0 → 1.30.0-next.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.30.0-next.0+da356b53703",
3
+ "version": "1.30.0-next.3+9e5db775675",
4
4
  "description": "Theia - Plugin API",
5
5
  "types": "./src/theia.d.ts",
6
6
  "publishConfig": {
@@ -32,5 +32,5 @@
32
32
  "nyc": {
33
33
  "extends": "../../configs/nyc.json"
34
34
  },
35
- "gitHead": "da356b537037680cdc7283a695ebfbf0c00d2cf1"
35
+ "gitHead": "9e5db7756755fe2cc4155f59fda27f32b3d5bbe4"
36
36
  }
@@ -332,6 +332,23 @@ export module '@theia/plugin' {
332
332
  matches: Range | Range[];
333
333
  }
334
334
 
335
+ /**
336
+ * Options to specify the size of the result text preview.
337
+ * These options don't affect the size of the match itself, just the amount of preview text.
338
+ */
339
+ export interface TextSearchPreviewOptions {
340
+ /**
341
+ * The maximum number of lines in the preview.
342
+ * Only search providers that support multiline search will ever return more than one line in the match.
343
+ */
344
+ matchLines: number;
345
+
346
+ /**
347
+ * The maximum number of characters included per line.
348
+ */
349
+ charsPerLine: number;
350
+ }
351
+
335
352
  /**
336
353
  * A line of context surrounding a TextSearchMatch.
337
354
  */
@@ -368,6 +385,18 @@ export module '@theia/plugin' {
368
385
  */
369
386
  limitHit?: boolean;
370
387
  }
388
+
389
+ export namespace workspace {
390
+ /**
391
+ * Find text in files across all [workspace folders] in the workspace
392
+ * @param query What to search
393
+ * @param optionsOrCallback
394
+ * @param callbackOrToken
395
+ * @param token
396
+ */
397
+ export function findTextInFiles(query: TextSearchQuery, optionsOrCallback: FindTextInFilesOptions | ((result: TextSearchResult) => void),
398
+ callbackOrToken?: CancellationToken | ((result: TextSearchResult) => void), token?: CancellationToken): Promise<TextSearchComplete>;
399
+ }
371
400
  // #endregion
372
401
 
373
402
  // #region read/write in chunks: https://github.com/microsoft/vscode/issues/84515
@@ -581,3 +610,21 @@ export module '@theia/plugin' {
581
610
 
582
611
  // #endregion
583
612
  }
613
+
614
+ /**
615
+ * Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
616
+ * and others. This API makes no assumption about what promise library is being used which
617
+ * enables reusing existing code without migrating to a specific promise implementation. Still,
618
+ * we recommend the use of native promises which are available in this editor.
619
+ */
620
+ interface Thenable<T> {
621
+ /**
622
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
623
+ * @param onfulfilled The callback to execute when the Promise is resolved.
624
+ * @param onrejected The callback to execute when the Promise is rejected.
625
+ * @returns A Promise for the completion of which ever callback is executed.
626
+ */
627
+ then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
628
+ then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
629
+ }
630
+