Should my plugin use a single ToolWindowFactory to create multiple tool windows?
Hi, I have extended ToolWindowFactory and registered it with my tool window extension in plugin.xml. With that, I am able to open my tool window. Now, I want to add another tool window, and am not sure if the intended design is to create a new ToolWindowFactory, or based on the ID of the tool window, create different content when called into my existing ToolWindowFactory.createToolWindowContent()?
Thanks,
Priya.
Please sign in to leave a comment.
Please use different factories for different tool windows.
Hello,
Since there is one factory per toolwindow, how to retrieve the object of class implementing ToolWindowFactory ?
Best regards
Hi Bernard, not sure I understand your question, but if you want to show a tool window, you can get an instance of the ToolWindow and activate it.
Hello,
Thank you for your anwser, but actually the question was how to adress the object instance of AppStructureToolWindowFactory
as soon as I declare something like :
<toolWindow id="AppStructureToolWindowFactory" factoryClass="AppStructureToolWindowFactory"/>
The objective of this question was to be able to invoke a method defined in AppStructureToolWindowFactory.
Regards
If you have lines like these in your plugin.xml
all methods would be called automatically.