Message dialog in Intellij

I need a message dialog which supports html links and contain "Read more..." kind of a link, that expands the dialog and shows extra information with examples. and "Read less" kind of link also. Currently i am using an internal api Message.showInfoMessage(), which doesn't support the normal HTML links and is not customizable. I need a new custom JDialog or an internal Intellij api which does. How to do?

0
3 comments
Official comment

I'd recommend to extend DialogWrapper class, make it modal, and add whatever you want as center panel. Don't forget to call init() method in constructor or before show().

this may work:

 JBPopupFactory factory = JBPopupFactory.getInstance();

BalloonBuilder builder =
factory.createHtmlTextBalloonBuilder(html, MessageType.INFO, null);
Balloon b = builder.createBalloon();

b.show(..);

 

0

It is not coming like a dialog. I used

b.show(RelativePoint.getCenterOf(WindowManager.getInstance().getStatusBar(project).getComponent()), Balloon.Position.above);

it is coming like a balloon at the bottom .

0

Please sign in to leave a comment.