Created
July 18, 2020 13:58
-
-
Save rahul-lohra/1ebf759f26202a86e72481746a349836 to your computer and use it in GitHub Desktop.
MyToolWindow code
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.rahul.gqlformat | |
import com.intellij.openapi.project.Project | |
import com.intellij.openapi.wm.ToolWindow | |
import com.intellij.openapi.wm.ToolWindowFactory | |
import com.intellij.ui.content.ContentFactory | |
class MyToolWindow : ToolWindowFactory { | |
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) { | |
val view = GqlView(project) | |
val contentFactory = ContentFactory.SERVICE.getInstance() | |
val content = contentFactory.createContent(view.panel, "", false) | |
toolWindow.contentManager.addContent(content) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment