How to show progressIndicator when task is successful or cancelled
Answered
I am using ProgressManager.getInstance().run() to execute a Task.backgroundable. When the task is running, I can set the text of progressIndicator but I don't see how to set the text for maybe like 2s,3s when the task is successful or cancelled.
Please sign in to leave a comment.
Hi,
If I understand you correctly that you want to keep the “action finished” text in progress indicator, then I don't see such a possibility, and I don't recommend doing it, as it will be inconsistent with IDE behavior.
If you want to inform users about finishing long running action, use notifications API.
hello, thank you. I won't add it in case of progress success. I want to set a text “plugin invalid” in the bottom right corner where UTF-8 and time is written. This text will stay there regardless of any plugin progress.
this is independent of any progress. i just want to add it as a status of plugin and it will stay there.
This is a different case from what you described initially.
See: https://plugins.jetbrains.com/docs/intellij/status-bar-widgets.html
Yes yes, this was a separate doubt I had. Thank you for helping!! Do you know any class where statusbar-widget is implemented where it's not a clickable widget and the icon and text are both visible. I just want to show “plugin unavailable” with an icon. I searched the GitHub for a sample implementation but couldn't find.
Sorry, I don't know such an example. I suggest searching it on https://jb.gg/ipe.
Okay, do you know which intellij class in is used for the git related status bar widget. I couldn't find it.
You can easily find it out by using techniques described on the Explore API page: https://plugins.jetbrains.com/docs/intellij/explore-api.html, e.g., by searching for the UI texts, or using UI Inspector.
hello, I am creating a statusBarWidget where I am implementing CustomStatusBarWidget. I want to have an icon and text side by side. The font of the text should be the same as other widgets. How to get the font of other widgets present? I am assuming I have to get font settings from appearance in appearance & behaviour in settings.
also, I want to get the height of status bar so that my icon adjusts itself acc to height change.