mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-14 16:07:52 +00:00
Plugins could show their own content in an editor tab (open-content-tab) but
could open the diff viewer only as the reply to one of that tab's actions. A
review plugin (a merge request's files, say) had no way to show a file's
before and after.
views.open-diff opens two texts in the invoking window's diff viewer, with
optional labels and title and a file name that picks the syntax highlighting;
web views send { op: "open-diff", ... }. The SDK wraps it as host::open_diff
with a mock. The plugin API moves to 1.7.0 (1.6.0 is released) and the checked-in
components are rebuilt.
22 lines
857 B
Plaintext
22 lines
857 B
Plaintext
package openidea:plugin@1.7.0;
|
|
|
|
/// What other plugins contributed to the extension points this plugin declares
|
|
/// (`[[extension-points]]` in `plugin.toml`; the contributors list this plugin
|
|
/// in `[[depends]]`). A change is announced by the `extensions-changed` event.
|
|
interface extensions {
|
|
use types.{error};
|
|
|
|
record contribution {
|
|
/// The contributing plugin's id.
|
|
plugin: string,
|
|
/// Its `[[contributes."<point>"]]` table as JSON, checked by the host
|
|
/// against the fields the point declares.
|
|
data: string,
|
|
}
|
|
|
|
/// The contributions to `point`, in the order the plugins started. Only the
|
|
/// plugin that declares `point` may read it (`denied` otherwise); `not-found`
|
|
/// when no running plugin declares it.
|
|
contributions: func(point: string) -> result<list<contribution>, error>;
|
|
}
|