File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package ai.devchat.idea
2+
3+ import com.intellij.ide.plugins.DynamicPluginListener
4+ import com.intellij.ide.plugins.IdeaPluginDescriptor
5+ import com.intellij.openapi.project.ProjectManager
6+ import com.intellij.openapi.wm.ToolWindowManager
7+
8+ class PluginInstallListener : DynamicPluginListener {
9+ override fun pluginLoaded (pluginDescriptor : IdeaPluginDescriptor ) {
10+ if (pluginDescriptor.pluginId.idString == " ai.devchat.plugin" ) {
11+ val openProjects = ProjectManager .getInstance().openProjects
12+ if (openProjects.isNotEmpty()) {
13+ ToolWindowManager .getInstance(openProjects[0 ]).getToolWindow(" DevChat" )?.show()
14+ }
15+ }
16+ }
17+ }
Original file line number Diff line number Diff line change 3434 id =" org.intellij.sdk.settings.AppSettingsConfigurable"
3535 displayName =" DevChat" />
3636 <applicationService serviceImplementation =" ai.devchat.idea.settings.DevChatSettingsState" />
37+ <applicationListeners >
38+ <listener class =" ai.devchat.idea.PluginInstallListener" topic =" com.intellij.ide.plugins.DynamicPluginListener" />
39+ </applicationListeners >
3740 <notificationGroup id =" Custom Notification Group"
3841 displayType =" BALLOON" />
3942 <notificationGroup id =" stickyBalloon" displayType =" STICKY_BALLOON" isLogByDefault =" true" />
You can’t perform that action at this time.
0 commit comments