Skip to content

Commit

Permalink
evolution on proposed API documentPaste with vs code 1.82 (#13010)
Browse files Browse the repository at this point in the history
note the API is currently stubbed
Fixes #12987

contributed on behalf of STMicroelectronics

Signed-off-by: Remi Schnekenburger <[email protected]>
Co-authored-by: Tobias Ortmayr <[email protected]>
  • Loading branch information
rschnekenbu and tortmayr authored Oct 23, 2023
1 parent eb43387 commit edf22c7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
## v1.43.0 - Unreleased

- [vsode] evolve proposed API for dropDocument [#13009](https://github.com/eclipse-theia/theia/pull/13009) - contributed on behalf of STMicroelectronics
- [vsode] evolve proposed API for documentPaste (stubbed) [#13010](https://github.com/eclipse-theia/theia/pull/13010) - contributed on behalf of STMicroelectronics
- [vsode] evolve proposed API for terminalQuickFixProvider [#13006](https://github.com/eclipse-theia/theia/pull/13006) - contributed on behalf of STMicroelectronics


<a name="breaking_changes_1.43.0">[Breaking Changes:](#breaking_changes_1.43.0)</a>

- [core] removed `SETTINGS_OPEN` menupath constant - replaced by `MANAGE_GENERAL` [#12803](https://github.com/eclipse-theia/theia/pull/12803)
Expand Down
25 changes: 14 additions & 11 deletions packages/plugin/src/theia.proposed.documentPaste.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,18 @@ export module '@theia/plugin' {
* An operation applied on paste
*/
class DocumentPasteEdit {
/**
* Identifies the type of edit.
*
* This id should be unique within the extension but does not need to be unique across extensions.
*/
id: string;

/**
* Human readable label that describes the edit.
*/
label: string;

/**
* The relative priority of this edit. Higher priority items are shown first in the UI.
*
* Defaults to `0`.
* Controls the ordering or multiple paste edits. If this provider yield to edits, it will be shown lower in the list.
*/
priority?: number;
yieldTo?: ReadonlyArray<
| { readonly extensionId: string; readonly providerId: string }
| { readonly mimeType: string }
>;

/**
* The text or snippet to insert at the pasted locations.
Expand All @@ -97,6 +91,15 @@ export module '@theia/plugin' {
}

interface DocumentPasteProviderMetadata {
/**
* Identifies the provider.
*
* This id is used when users configure the default provider for paste.
*
* This id should be unique within the extension but does not need to be unique across extensions.
*/
readonly id: string;

/**
* Mime types that {@link DocumentPasteEditProvider.prepareDocumentPaste provideDocumentPasteEdits} may add on copy.
*/
Expand Down

0 comments on commit edf22c7

Please sign in to comment.