Hi, I want to make a click-to-jump plugin

Hi, I want to make a click-to-jump plugin. Like this.

You can create a reference to a fake psiElement, it would resolve() to references to an inheritor of the com.intellij.psi.impl.FakePsiElement class
see: com.intellij.openapi.paths.WebReference

Is it safe to assume you mean not for URLs like the example you gave?

e.g. something like below…

// this is a comment foo://and_this_is_clickable_and_will_jump_to_line#24 is where the bug is
public class Foobar {
...

The reason I ask is to clarify, because, at least for me, the URL you have outlined is clickable.

Yes, do you have any suggestions?

It sounds similar to another question asked in the old forum/community/support-area :backhand_index_pointing_right: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360004509340/comments/360000707519 which is very similar to what @eltonsandre suggested above.

If you’re specifically looking for “specific text/regex pattern → webpage”, then you could look at “Issue Navigation” feature of IJ platform. I have a plugin that leverages this to automatically configure text like (#123) in repos to automatically navigate to the respective GitHub issue (e.g. https://github.com/<owner>/<repo>/issues/123).

If you’re specifically looking for “specific text/regex pattern → something else” (where something else might be a specific element somewhere in the IJ project (or elsewhere), then fake psi element route might be a good option.

For your own language add PsiLiteralValue interface to the PSI element implementation (and interface) and all kind of these references will be applied automatically.