Is there a way to register custom links in the Terminal/Debug Output?
Answered
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
Please sign in to leave a comment.
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
Thanks, Karol Lewandowski!
Based on the details you shared I could implement it at https://github.com/marceloneppel/applinks-plugin/commit/a59da493e8712fdf276c4347f1073671f8c04be6.