How to get a list of all registered tool window IDs upon project open

I'm wondering if someone can tell me how to get a list of all registered tool window IDs when a project is opened. I know about ToolWindowManager.getToolWindowIds(), but it doesn't do me much good to call it from the projectOpened() method because all the components won't (necessarily) be registered yet.

Is there some method I can implement which gets called after a project is opened AND after all the components have been registered?

thanks!

2 comments

Try the new StartupManager:

STartupManager.getInstance(myProject).registerPostStartupActivity(new Runnable...)



Chris Bartley wrote:

I'm wondering if someone can tell me how to get a list of all registered tool window IDs when a project is opened. I know about ToolWindowManager.getToolWindowIds(), but it doesn't do me much good to call it from the projectOpened() method because all the components won't (necessarily) be registered yet.

Is there some method I can implement which gets called after a project is opened AND after all the components have been registered?

thanks!


--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0

Thanks Erb, that helps a bit, but it still doesn't totally fix the problem. I registered this:


...by doing this...


...but still only received the following output in the console:



It looks to me like the Project, Structure, Commander, etc. tool windows are apparently being registered after projectOpened() is called and even after the post startup activity. Any idea why?

All I really wanted to do was create a simple plugin to hide the Commander tool window button (I never use it, so I'd rather not even see it) when a project is opened. I could force the user to perform some action to do it, but that's kinda lame.

thanks,

Chris

0

Please sign in to leave a comment.