I need to access my custom toolwindow from an action. In my case, the action triggers an update of the list displayed in the toolwindow. I tried two ways:
1) Make the toolwindow accessible via action-data. This did not work when assigning a shortcut to the action and the shortcut is used from some place outside of the toolwindow.
2) Make the toolwindow a singleton. This does not work when multiple IntelliJ projects / windows are open.
Related change (where I switched from method 1 to 2, but broke multipe IntelliJ window support: https://github.com/uwolfer/gerrit-intellij-plugin/commit/40189fa7745717be668b413f0a34c595451cb044
Any ideas how this could be solved in a clean way?