I'm using EditorTextFields in tool windows in my plugin. When multiple projects are opened with these tool windows showing and you close one project, the EditorTextFields in other projects are disposed and the component region turns into a green box. The problem is easily remedied by toggling the tool window after which the EditorTextField is back as if nothing had happened, but obviously this behavior is not ideal.
Any idea why this would be happening and what I might be able to do to prevent it? I'm creating the EditorTextField components using:
ServiceManager.getService(project, EditorTextFieldProvider.class).getEditorField(MyLanguage.INSTANCE, project, editorCustomizationFeatures);
after which I add the EditorTextField to my tool window's layout.
I've been registering each tool window tab's content with the Disposer for the containing project:
Content content = toolWindow.getContentManager().getFactory().createContent(...);
and thought that might be contributing, but the problem still occurs even when I remove that Disposer registration.
It seems odd to me that closing one project would cause this behavior in all other open projects. Any thoughts are sincerely appreciated!