Файли
openidea/crates/ide-plugin/tests/fixtures/clipboard/plugin.toml
T
Bert Verhelstтаbertyhell 69d839e123 feat(plugins): read the clipboard from user-invoked commands (API 1.11) (#4047)
Plugins could write the clipboard but not read it. ui.read-clipboard() (SDK host::read_clipboard()) returns the text and a PNG image of the user's clipboard, behind a new clipboard.read capability. Only calls the user started can read: plugin commands and view actions run by the user, not event handlers, web view messages or commands chained through command-runner. The host never reads the clipboard itself: it asks the invoking window (ClipboardRequested / plugin_answer_clipboard), so remote development reads the client's clipboard, and a remote window asks the user first. Plugin API 1.11.0; components rebuilt.

Closes #3524

Co-authored-by: bertyhell <[email protected]>
2026-11-18 09:20:09 +08:00

26 рядки
675 B
TOML

# Test fixture: `ui.read-clipboard` (API 1.11) from a command, a view's button,
# a web view message and an event handler; only the first two are the user's.
id = "test.clipboard"
name = "Clipboard fixture"
version = "0.1.0"
engines.openidea = "^1.11"
wasm = "dist/plugin.wasm"
activation = ["on-command:*", "on-view:clipboard", "on-event:editor-focused"]
[capabilities]
optional = ["clipboard.read", "events"]
[[contributes.commands]]
id = "read"
title = "Read the clipboard"
[[contributes.commands]]
id = "last"
title = "What the last view action or event read"
[[contributes.views]]
id = "clipboard"
title = "Clipboard"
icon = "toolwindow-services"
location = "right"