Last active
February 4, 2017 14:06
-
-
Save itsakt/86ada76e8cb40551ad2d6c221757a531 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.akt.awesomeplugin; | |
import com.intellij.openapi.project.Project; | |
import com.intellij.openapi.wm.ToolWindow; | |
import com.intellij.openapi.wm.ToolWindowFactory; | |
import com.intellij.ui.content.Content; | |
import com.intellij.ui.content.ContentFactory; | |
import org.jetbrains.annotations.NotNull; | |
import javax.swing.*; | |
public class ToolWindowHandler implements ToolWindowFactory { | |
private JPanel toolWindowContent; | |
@Override | |
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) { | |
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance(); | |
Content content = contentFactory.createContent(toolWindowContent, "", false); | |
toolWindow.getContentManager().addContent(content); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment