ToolWindow not showing up

I am trying to build a very simple plugin that has a tool window, but it never shows up in the UI, and there are no errors in the log.  Any help would be appreciated.
My plugin.xml:

<idea-plugin version="2">
  <name>Plugin display name here</name>
  <vendor email="" url="">YourCompany</vendor>
      Enter short description for your plugin here.<br>
      <em>most HTML tags may be used</em>
      Add change notes here.<br>
      <em>most HTML tags may be used</em>
  <idea-version since-build="131"/>
  <extensions defaultExtensionNs="com.intellij">
    <toolWindow id="Sample" anchor="bottom" factoryClass="MyToolWindowFactory" icon="/general/add.png"/>
import com.intellij.openapi.project.Project
import com.intellij.openapi.wm.ToolWindow
import com.intellij.openapi.wm.ToolWindowFactory
import com.intellij.ui.content.ContentFactory
import org.jetbrains.annotations.NotNull
MyToolWindowFactory implements ToolWindowFactory {

    MyToolWindowFactory() {
        println "here"

createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
        println 'create'
panel = new ToolPanel()
        toolWindow.contentManager.addContent(ContentFactory.SERVICE.getInstance().createContent(panel, "a", false))
* Created by astortz on 2/5/15.
import com.intellij.openapi.ui.SimpleToolWindowPanel

import javax.swing.JTextArea

class ToolPanel extends SimpleToolWindowPanel {
    ToolPanel() {
        super(true, true)
        def information = new JTextArea();
        information.setText("hello world")
Comment actions Permalink

How exactly do you run your plugin? Do you see it in the list of installed plugins in Settings | Plugins?

Comment actions Permalink

I was using the Run/Debug menu.  When I went to see if it was listed in the installed plugins, I noticed a menu that I had removed from the plugin was still present.  This lead me to believe that the plugin.xml was not being evaluated on each run.  So I uninstalled the plugin and re-ran/debugged the plugin and my menu disappeared and my tool window showed up!

So, thanks for pointing me in a direction that helped me spot the issue.

Is there another way to reload/reevaluate the plugin.xml when it has changed?

Comment actions Permalink

The plugin is reevaluated on each run. Possibly the problem was that you ended up with multiple installations of your plugin with the same ID in different directories. Uninstalling the plugin removed the outdated extra copy.


Please sign in to leave a comment.