1
0

Compare commits

..

No commits in common. "5a59a26bbb7df89ca616adbb0d6e37b40d1f93bb" and "43857c2f7ff59c9b9c8bf56f8b4575259d764cf0" have entirely different histories.

4 changed files with 3 additions and 29 deletions

View File

@ -8,7 +8,7 @@ plugins {
} }
group = "com.chylex.intellij.keeppopupswhiledebugging" group = "com.chylex.intellij.keeppopupswhiledebugging"
version = "1.1" version = "1.0.1"
repositories { repositories {
mavenCentral() mavenCentral()

View File

@ -17,7 +17,7 @@ class PluginLoadListener : DynamicPluginListener {
} }
override fun beforePluginUnload(pluginDescriptor: IdeaPluginDescriptor, isUpdate: Boolean) { override fun beforePluginUnload(pluginDescriptor: IdeaPluginDescriptor, isUpdate: Boolean) {
if (pluginDescriptor.pluginId.idString == PLUGIN_ID && !PreventHidingPopups.tryUninstallListener()) { if (pluginDescriptor.pluginId.idString == PLUGIN_ID) {
throw CannotUnloadPluginException("A restart is required to unload Keep Editor Tooltips While Debugging plugin.") throw CannotUnloadPluginException("A restart is required to unload Keep Editor Tooltips While Debugging plugin.")
} }
} }

View File

@ -13,30 +13,9 @@ class PreventHidingPopups : StartupActivity {
} }
companion object { companion object {
private var isInstalled = false
fun installListener() { fun installListener() {
if (isInstalled) {
return
}
EditorMouseHoverPopupManager.getInstance() // Installs the default listener. EditorMouseHoverPopupManager.getInstance() // Installs the default listener.
EditorMouseHoverPopupControl.getInstance()?.addListener(MouseTrackingDisabledListener) EditorMouseHoverPopupControl.getInstance()?.addListener(MouseTrackingDisabledListener)
isInstalled = true
}
fun tryUninstallListener(): Boolean {
val instance = EditorMouseHoverPopupControl.getInstance() ?: return true
return try {
val listenersField = instance.javaClass.getDeclaredField("listeners").also { it.isAccessible = true }
val listeners = listenersField.get(instance) as MutableCollection<*>
listeners.remove(MouseTrackingDisabledListener)
isInstalled = false
true
} catch (e: Exception) {
false
}
} }
fun enablePopupsInAllProjects() { fun enablePopupsInAllProjects() {

View File

@ -10,17 +10,12 @@
If you hover an element that has tooltips from both the editor and the debugger, both tooltips are shown and moving the cursor on top of one hides the other. If you hover an element that has tooltips from both the editor and the debugger, both tooltips are shown and moving the cursor on top of one hides the other.
<br><br> <br><br>
Installing the plugin automatically re-enables all editor tooltips, even if installed in the middle of a debugging session. Installing the plugin automatically re-enables all editor tooltips, even if installed in the middle of a debugging session.
Disabling or uninstalling the plugin takes effect when the next debugging session starts. Disabling or uninstalling the plugin requires an IDE restart.
<br><br> <br><br>
<a href="https://youtrack.jetbrains.com/issue/IDEA-120435">IDEA-120435</a> <a href="https://youtrack.jetbrains.com/issue/IDEA-120435">IDEA-120435</a>
]]></description> ]]></description>
<change-notes><![CDATA[ <change-notes><![CDATA[
<b>Version 1.1</b>
<ul>
<li>Disabling or uninstalling the plugin no longer requires a restart.</li>
</ul>
<b>Version 1.0.1</b>
<ul> <ul>
<li>Renamed the plugin to "Keep Editor Tooltips While Debugging" and updated description.</li> <li>Renamed the plugin to "Keep Editor Tooltips While Debugging" and updated description.</li>
</ul> </ul>