Update icons on toolbar when menu option selected
已回答
I am developing a plugin in which I'll have an action as menu option and the action on the toolbar. Like the debug icon in IntelliJ, I'd like to show a small green dot when it's active and remove the green dot when it is not active. I achieved that using a simple e.getPresentation().setIcon() and changing icons when ever the toolbar icon is clicked.
Problem is I am unable to find a way to update the toolbar icon when the user would click on menu option. Can you help me do this ?
请先登录再写评论。
https://github.com/JetBrains/intellij-community/blob/master/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/AnAction.java#L267