Custom actions disappear from toolbar

Hi all,

I customized my tool bar by adding an action. The action is registered by a custom plugin in a
module component, at its 'moduleAdded' method. The plugin unregisters its actions, and then
re-registers them, because the list of available actions is dynamic and might differ from the list
of actions previously registered.

So far so good - works good. However, if I restart IDEA, the tool bar button disappears, although
when I go to Settings/Customizations, I still see it there. If I make a modification to the tool bar
(move the button up or down, or add something else), it reappears.

I believe that's a bug, but I'm not sure (could be the plugin's fault due to the
unregistration/reregistration process).

Should I file a JIRA issue, or should I modify the plugin behavior to something different?

TIA,
Arik.

2 comments
Comment actions Permalink

Hi,

unfortunatly, you have to change the plugin's behaviour.
Toolbar actions are cached so if your plugin unregistered them in that very
moment
you wouldn't be able to see them until other caching occurs.

Thank you.
--
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"


"Arik Kfir" <arikkfir@gmail.com> wrote in message
news:da6h65$vrk$1@is.intellij.net...

Hi all,

>

I customized my tool bar by adding an action. The action is registered by

a custom plugin in a

module component, at its 'moduleAdded' method. The plugin unregisters

its actions, and then

re-registers them, because the list of available actions is dynamic and

might differ from the list

of actions previously registered.

>

So far so good - works good. However, if I restart IDEA, the tool bar

button disappears, although

when I go to Settings/Customizations, I still see it there. If I make a

modification to the tool bar

(move the button up or down, or add something else), it reappears.

>

I believe that's a bug, but I'm not sure (could be the plugin's fault due

to the

unregistration/reregistration process).

>

Should I file a JIRA issue, or should I modify the plugin behavior to

something different?
>

TIA,
Arik.



0
Comment actions Permalink

Anna,

Thanks for your quick reply. I'll change the plugin to only add/remove actions when necessary...it
seems more appropriate anyway ;)



Anna Kozlova (JetBrains) wrote:

Hi,

unfortunatly, you have to change the plugin's behaviour.
Toolbar actions are cached so if your plugin unregistered them in that very
moment
you wouldn't be able to see them until other caching occurs.

Thank you.

0

Please sign in to leave a comment.