Skip to content

Commit

Permalink
disable for android studio
Browse files Browse the repository at this point in the history
  • Loading branch information
reymondzzzz committed May 24, 2024
1 parent fe9de70 commit 014c825
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ repositories {


// Configure Gradle IntelliJ Plugin
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension-type
intellij {
// version.set("LATEST-EAP-SNAPSHOT")
version.set("2022.3.1")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import com.intellij.openapi.wm.ToolWindowFactory
import com.intellij.openapi.wm.ToolWindowManager
import com.intellij.ui.content.Content
import com.intellij.ui.content.ContentFactory
import com.intellij.ui.jcef.JBCefApp
import com.smallcloud.refactai.Resources
import com.smallcloud.refactai.panes.gptchat.ChatGPTPanes
import com.smallcloud.refactai.panes.sharedchat.ChatPanes
import com.smallcloud.refactai.utils.getLastUsedProject
import com.smallcloud.refactai.panes.sharedchat.SharedChatPane


class RefactAIToolboxPaneFactory : ToolWindowFactory {
Expand All @@ -20,6 +20,16 @@ class RefactAIToolboxPaneFactory : ToolWindowFactory {
super.init(toolWindow)
}

override fun isApplicable(project: Project): Boolean {
return try {
JBCefApp.isSupported() && JBCefApp.isStarted()
JBCefApp.isSupported()
} catch (_: Exception) {
false
}
}


override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
val contentFactory = ContentFactory.getInstance()

Expand Down

0 comments on commit 014c825

Please sign in to comment.