Skip to content

Commit

Permalink
vscode: Make TerminalLink compatible to VS Code 1.64.2
Browse files Browse the repository at this point in the history
In the course of fixing this, I discovered eclipse-theia#11521.
Turning `TerminalLink` into a class with a constructor will help anyway,
and is effective once eclipse-theia#11521 is fixed.

Fixes eclipse-theia#11507

Contributed on behalf of STMicroelectronics.

Change-Id: I7aa945445cbbe05f09746d7824b3153fec6b38f2
Signed-off-by: Philip Langer <planger@eclipsesource.com>
  • Loading branch information
planger committed Aug 3, 2022
1 parent 7e177f9 commit 0f56515
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3097,14 +3097,14 @@ export module '@theia/plugin' {
/**
* A link on a terminal line.
*/
export interface TerminalLink {
export class TerminalLink {
/**
* The start index of the link on [TerminalLinkContext.line](#TerminalLinkContext.line].
* The start index of the link on {@link TerminalLinkContext.line}.
*/
startIndex: number;

/**
* The length of the link on [TerminalLinkContext.line](#TerminalLinkContext.line]
* The length of the link on {@link TerminalLinkContext.line}.
*/
length: number;

Expand All @@ -3116,6 +3116,18 @@ export module '@theia/plugin' {
* depending on OS, user settings, and localization.
*/
tooltip?: string;

/**
* Creates a new terminal link.
* @param startIndex The start index of the link on {@link TerminalLinkContext.line}.
* @param length The length of the link on {@link TerminalLinkContext.line}.
* @param tooltip The tooltip text when you hover over this link.
*
* If a tooltip is provided, is will be displayed in a string that includes instructions on
* how to trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary
* depending on OS, user settings, and localization.
*/
constructor(startIndex: number, length: number, tooltip?: string);
}

/**
Expand Down

0 comments on commit 0f56515

Please sign in to comment.