I'd like to initialize the content of a toolwindow when toolwindowmanager activates it but can't find a way to do it....
Does anyone can help please ?
It doesn't look like there's an OpenAPI available for that. However there's the ToolWindowManagerEx interface in idea.jar that can register ToolWindowManagerListeners. Maybe this could help.
It might also be possible by attaching a ComponentListener to the ToolWindow's Component and listening to the componentXXXX() events. Good luck ;)
� wrote:
It doesn't look like there's an OpenAPI available for that. However there's the
ToolWindowManagerEx interface in idea.jar that can register ToolWindowManagerListeners.
Maybe this could help.
It might also be possible by attaching a ComponentListener to the ToolWindow's Component
and listening to the componentXXXX() events. Good luck ;)
Sascha
�
>I'd like to initialize the content of a toolwindow when toolwindowmanager activates it but can't find a way to do it....
>
I've used this with success to ensure that the toolwindow contents is
initialized:
mainPanel.addAncestorListener (new AncestorListener()
{
public final void ancestorAdded (AncestorEvent event) {
doWhenPanelShowsUp ();
}
void doWhenPanelShowsUp () {
if ( ! __isLogin) {
...
__isLogin = true;
}
}
public final void ancestorRemoved (AncestorEvent event) { }
public final void ancestorMoved (AncestorEvent event) { }
});
Thank you Sascha and Alain.
I'll try Alain's way since it won't force me to use something not in openapi...