How to define toolwindow display name different from ID?

Is there a way to define a toolwindow display name different from the ID? I tried Intellij autocomplete in plugin.xml, but it offers no solution regarding the display name.
A document I found states that the ID defines the display name, but I can't use the word as an ID, because it's used elsewhere and my toolwindow just won't show up with it.

7 comments

Yes, the ID does define the display name when you register toolwindows via plugin.xml. I don't quite understand what you mean by "is used elsewhere". Having two toolwindows with the same display name would be extremely confusing for users even if the code did allow it.

0

I thought the ID was used elsewhere, not as a toolwindow, but was reserved by something else, because the toolwindow didn't appear.
However I only have one toolwindow with simple name, not containing any special symbols, only usual latin letters, 5 of them. Any idea why it won't appear? It works when I change it to something else, or add letters.

0

Are there any exceptions in the log?

0

[  34632]  ERROR - tartup.impl.StartupManagerImpl - window with id="WindowID" is already registered
java.lang.IllegalArgumentException: window with id="WindowID" is already registered

I only have one toolwindow, but I do have a facet and an executor with the same ID. Tried changing those, but didn't affect anything.

0

Ok, I actually think I understand what is wrong.
Since Executor and ToolWindow are both registered to "extensions" section, and executor also produces a toolwindow the ID's will conflict...
Did not immediately notice this since executor ID is taken from class file.
Tried again and confirmed that changing the executor ID fixed the issue.

0

This problem has nothing to do with the fact that executor and toolwindow are both extensions. An executor registers its own toolwindow (the ID of which is returned from Executor.getToolWindowId()), and you are registering the same window manually again. I think you should try to stick with one toolwindow; I don't think the users of your plugin will be happy if it creates two separate toolwindows for the same functionality.

0

The toolwindows provide different functionality for different areas of the plugin. I'm not registering the same toolwindow twice. It just happened to be a logical choice to name them both after the plugin name.
I just didn't realize at first that the executor provided window was also a toolwindow.

0

Please sign in to leave a comment.