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.
27 lines
956 B
Plaintext
27 lines
956 B
Plaintext
package openidea:plugin@1.7.0;
|
|
|
|
/// HTTP endpoints found in a project (`[[contributes.endpoints]]`).
|
|
interface endpoints-provider {
|
|
use types.{error, location};
|
|
use invocation.{invocation};
|
|
|
|
/// One HTTP route.
|
|
record endpoint {
|
|
/// `none` accepts any HTTP method.
|
|
method: option<string>,
|
|
/// Path parameters use braces, e.g. `/photos/{id}`.
|
|
path: string,
|
|
/// Shown next to the route, e.g. `Rails`.
|
|
framework: string,
|
|
/// Display name, e.g. `PhotosController#show`.
|
|
handler: option<string>,
|
|
/// Where the route is declared, inside the project.
|
|
location: location,
|
|
}
|
|
|
|
/// The project's routes, complete. Called when the IDE first needs them and
|
|
/// again after a file matching `files` changes; cached in between. Runs in
|
|
/// the background: it can't ask the user.
|
|
endpoints: func(ctx: borrow<invocation>) -> result<list<endpoint>, error>;
|
|
}
|