How to preserved tool window

Hi Team,

I created tool window to display some results(data grid), but when user restart the IDE taht tool window is gone. Is this the default behaviour or Is it possible to dock tool window untill user close it (even IDE restart previous tool window need to appear content data can be empty).

I created tool window using 'ToolWindowManager' class and not configured using plugin.xml.

Thanks,
Navin

3 comments
Comment actions Permalink

ToolWindow is registered by its' unique ID. This ID is also used to save/restore layout.
So, if IDE tries to restore toolwindow with 'unknown' ID it fails.
You should add your toolwindow to plugin.xml as ProjectComponent or ApplicationComponent

0
Comment actions Permalink

Hi Vassiliy,

Is it possible to register a tool window as ApplicationComponent? I thought it always needs to use project instance to be created/registered.

0
Comment actions Permalink

It's may register toolwindow like this:

plugin.xml

<idea-plugin>

...

  <extensions>

<toolWindow id="{MyUniqueID}" anchor="right" secondary="false" icon="..." factoryClass="..." />

  </extensions>

</idea-plugin>

0

Please sign in to leave a comment.