Is there a way to register custom links in the Terminal/Debug Output?

已回答

Hello,

A while back I developed an extension for Visual Studio Code. The idea was quite simple: match text with a regex. If there is a match I want to convert it to a clickable hyperlink that triggers a callback in my extension to handle it.

The APIs for VSCode are `vscode.window.registerTerminalLinkProvider` (and `vscode.TerminalLink`), is there an equivalent API in the IntelliJ platform? If not, is there a way to achieve this indirectly?

Best regards,

Duncan

0

Hi,

You need to implement com.intellij.execution.filters.ConsoleFilterProvider and register it in com.intellij.consoleFilterProvider extension point.

You can find example implementations at https://jb.gg/ipe?extensions=com.intellij.consoleFilterProvider and in the platform code, e.g.:
https://github.com/JetBrains/intellij-community/blob/master/plugins/kotlin/run-configurations/jvm/src/org/jetbrains/kotlin/idea/run/KotlinConsoleFilterProvider.kt

1

请先登录再写评论。