feat: 功能更新

This commit is contained in:
2024-01-07 14:16:07 +08:00
parent 50a42227b6
commit ee26516928
3 changed files with 5 additions and 5 deletions

View File

@@ -20,14 +20,14 @@ class MyToolWindowFactory : ToolWindowFactory {
}
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
val myToolWindow = MyToolWindow(toolWindow)
val myToolWindow = MyToolWindow()
val content = ContentFactory.getInstance().createContent(myToolWindow.getContent(), "", false)
toolWindow.contentManager.addContent(content)
}
override fun shouldBeAvailable(project: Project) = true
class MyToolWindow(toolWindow: ToolWindow) {
class MyToolWindow() {
fun getContent() = JBPanel<JBPanel<*>>().apply {
val noSupportLabel = JBLabel(MyBundle.message("noSupport"))
if (JBCefApp.isSupported()) {