How to add text to the StatusBar?
Hi all,
I'm trying to add some features to the Asciidoc plugin, and a new feature to add is adding a wordcounter to the IntelliJ status bar. However, how do I add text there?
I tried the following:
StatusBar statusBar = WindowManager.getInstance().getStatusBar(project); JBPopupFactory.getInstance() .createHtmlTextBalloonBuilder("Test", MessageType.WARNING, null) .setFadeoutTime(7500) .createBalloon() .show(RelativePoint.getCenterOf(statusBar.getComponent()), Balloon.Position.atRight);
But nothing happens; no balloon is show. Addig some breakpoints does indicate that this code is called. Also, I don't want to add a balloon, I'd like to add some text... any suggestions?
Thanks,
Erik
请先登录再写评论。
StatusBar.addWidget()
Thanks to the Mks plugin, I found it: https://code.google.com/p/ideamksplugin/source/browse/trunk/src/main/java/org/intellij/vcs/mks/MksStatusWidget.java?r=372
You need to use a TextRepresentation to display text.