[Intellij][Plagin][OpenApi] Messages.showMessageDialog. How to add Swing Icons to message text?
已回答
A want to add several Swing Icon to message in MessageDialog.
Using something like:
Messages.showMessageDialog(
myProject,
title = "My title",
message = "Here I need to add some Icons in message text",
icon = defaultDialogIcon
)
So as I understand, I need to get String representation of Icon, isn't it? But I don't know how.
请先登录再写评论。
This is a regular Swing Icon, as used everywhere in the IntelliJ Platform https://plugins.jetbrains.com/docs/intellij/work-with-icons-and-images.html
Unfortunately there’s no answer for my question. Could you please help with the example?
Please see the linked page in how to setup icons, you can use SVG (or PNG) files provided by your plugin.