intellij-elm
intellij-elm copied to clipboard
Only show Elm tool window for Elm projects
As mentioned in https://github.com/klazuka/intellij-elm/pull/716#pullrequestreview-487338467, it would be nice to only show the Elm tool window if Elm is configured in the project.
The Maven and Gradle plugins have this behavior, so it seems like it should be possible.
The gradle plugin uses the AbstractExternalSystemToolWindowFactory rather than manually configuring the tool window. That factory is designed to implement common functionality for tools windows for build systems, so it seems to be the solution.
It seems like the "external system" for gradle is being configured by the GradleProjectResolver, although I'm sure how it works. As usual, there doesn't seem to be any much on those APIs.
Although it would be nice to be able to hide the tool window, I doubt it's worth the work of trying to figure out that system.
Another option is just to consolidate everything into a single tool-window (at the bottom) rather than greedily showing 2!