@theia/plugin 1.59.0 → 1.60.0-next.47

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/theia.d.ts +29 -48
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/plugin",
3
- "version": "1.59.0",
3
+ "version": "1.60.0-next.47+9332521b9",
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": "21358137e41342742707f660b8e222f940a27652"
35
+ "gitHead": "9332521b9aa74bf534d45968905d37e30a13c3b5"
36
36
  }
package/src/theia.d.ts CHANGED
@@ -357,19 +357,21 @@ export module '@theia/plugin' {
357
357
  export class Selection extends Range {
358
358
 
359
359
  /**
360
- * Position where selection starts.
360
+ * The position at which the selection starts.
361
+ * This position might be before or after {@link Selection.active active}.
361
362
  */
362
- anchor: Position;
363
+ readonly anchor: Position;
363
364
 
364
365
  /**
365
- * Position of the cursor
366
+ * The position of the cursor.
367
+ * This position might be before or after {@link Selection.anchor anchor}.
366
368
  */
367
- active: Position;
369
+ readonly active: Position;
368
370
 
369
371
  /**
370
- * A selection is reversed if `active.isBefore(anchor)`
372
+ * A selection is reversed if its {@link Selection.anchor anchor} is the {@link Selection.end end} position.
371
373
  */
372
- isReversed: boolean;
374
+ readonly isReversed: boolean;
373
375
 
374
376
  /**
375
377
  * Create a selection from two positions.
@@ -12243,6 +12245,26 @@ export module '@theia/plugin' {
12243
12245
  */
12244
12246
  hideWhenEmpty?: boolean;
12245
12247
 
12248
+ /**
12249
+ * Context value of the resource group. This can be used to contribute resource group specific actions.
12250
+ * For example, if a resource group is given a context value of `exportable`, when contributing actions to `scm/resourceGroup/context`
12251
+ * using `menus` extension point, you can specify context value for key `scmResourceGroupState` in `when` expressions, like `scmResourceGroupState == exportable`.
12252
+ * ```json
12253
+ * "contributes": {
12254
+ * "menus": {
12255
+ * "scm/resourceGroup/context": [
12256
+ * {
12257
+ * "command": "extension.export",
12258
+ * "when": "scmResourceGroupState == exportable"
12259
+ * }
12260
+ * ]
12261
+ * }
12262
+ * }
12263
+ * ```
12264
+ * This will show action `extension.export` only for resource groups with `contextValue` equal to `exportable`.
12265
+ */
12266
+ contextValue?: string;
12267
+
12246
12268
  /**
12247
12269
  * This group's collection of
12248
12270
  * {@link SourceControlResourceState source control resource states}.
@@ -14528,6 +14550,7 @@ export module '@theia/plugin' {
14528
14550
  *
14529
14551
  * @returns The resolved edit or a thenable that resolves to such. It is OK to return the given
14530
14552
  * `edit`. If no result is returned, the given `edit` is used.
14553
+ * @stubbed
14531
14554
  */
14532
14555
  resolveDocumentDropEdit?(edit: T, token: CancellationToken): ProviderResult<T>;
14533
14556
  }
@@ -14728,48 +14751,6 @@ export module '@theia/plugin' {
14728
14751
  */
14729
14752
  export type CharacterPair = [string, string];
14730
14753
 
14731
- /**
14732
- * An edit operation applied {@link DocumentDropEditProvider on drop}.
14733
- */
14734
- export class DocumentDropEdit {
14735
- /**
14736
- * The text or snippet to insert at the drop location.
14737
- */
14738
- insertText: string | SnippetString;
14739
-
14740
- /**
14741
- * An optional additional edit to apply on drop.
14742
- */
14743
- additionalEdit?: WorkspaceEdit;
14744
-
14745
- /**
14746
- * @param insertText The text or snippet to insert at the drop location.
14747
- */
14748
- constructor(insertText: string | SnippetString);
14749
- }
14750
-
14751
- /**
14752
- * Provider which handles dropping of resources into a text editor.
14753
- *
14754
- * This allows users to drag and drop resources (including resources from external apps) into the editor. While dragging
14755
- * and dropping files, users can hold down `shift` to drop the file into the editor instead of opening it.
14756
- * Requires `editor.dropIntoEditor.enabled` to be on.
14757
- */
14758
- export interface DocumentDropEditProvider {
14759
- /**
14760
- * Provide edits which inserts the content being dragged and dropped into the document.
14761
- *
14762
- * @param document The document in which the drop occurred.
14763
- * @param position The position in the document where the drop occurred.
14764
- * @param dataTransfer A {@link DataTransfer} object that holds data about what is being dragged and dropped.
14765
- * @param token A cancellation token.
14766
- *
14767
- * @return A {@link DocumentDropEdit} or a thenable that resolves to such. The lack of a result can be
14768
- * signaled by returning `undefined` or `null`.
14769
- */
14770
- provideDocumentDropEdits(document: TextDocument, position: Position, dataTransfer: DataTransfer, token: CancellationToken): ProviderResult<DocumentDropEdit>;
14771
- }
14772
-
14773
14754
  /**
14774
14755
  * Represents a session of a currently logged in user.
14775
14756
  */