Displaying an image in source code editor

Hi,

I'd like to display an image below a Java class's Javadoc within the source code editor (not within the generated Javadoc itself).

Can anyone tell me what construct would be used to do that? Do I interact with the Editor instace?  Do I have to create a custom Editor?  Something else?

I'm brand new to IntelliJ plugins so I'm not sure what part of the system would be responsible for rendering that image.

Also, if it matters, the image would be sitting in a subdirectory of the project, so a project-relative path would be used to refrence it.

Thanks for the help.

Matt

3 comments
Comment actions Permalink

This is not possible in the current version of IntelliJ IDEA. The  editor can display only text, and does not support embedding of non-text  things such as an image file.
You can display images on hover, or in popups, or in dialogs, but not within the editor itself.

0
Comment actions Permalink

Hi,

It would be cool though if it could. E.g. in Rstudio, Markdown documents embeds linked images directly in the editor. It's still plain text but it feels more like richt text. Example:



Best,

Holger

0
Comment actions Permalink

I'm also interested in such behavior for my Tmar plugin 

This would considerably improve user experience !

(https://plugins.jetbrains.com/plugin/9925-tmar-plugin)

0

Please sign in to leave a comment.