IJPL-60317 Move Debugging Info in UI to Internal Actions

According to the new mockups, change its name, make it
a toggleable action and move it to Internal Actions | UI.

GitOrigin-RevId: 6bc222bb9fe1436dadb83fc6b80c626bdc46e8cb
This commit is contained in:
Sergei Tachenov
2024-05-14 10:21:33 +03:00
committed by intellij-monorepo-bot
parent 425591aab9
commit c82bda644d
4 changed files with 8 additions and 17 deletions

View File

@@ -217,7 +217,7 @@ class UISettingsState : BaseState() {
@get:Internal
@set:Internal
@get:OptionTag("SHOW_INPLACE_COMMENTS_INTERNAL")
var showInplaceCommentsInternal: Boolean by property(true)
var showInplaceCommentsInternal: Boolean by property(false)
@get:OptionTag("SHOW_VISUAL_FORMATTING_LAYER")
var showVisualFormattingLayer: Boolean by property(false)

View File

@@ -2,10 +2,9 @@
package com.intellij.ide.actions
import com.intellij.ide.ui.UISettings
import com.intellij.idea.ActionsBundle
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.project.DumbAwareAction
import com.intellij.openapi.project.DumbAwareToggleAction
import com.intellij.openapi.wm.impl.IdeBackgroundUtil
import com.intellij.util.ui.UIUtil
import com.intellij.util.ui.tree.TreeUtil
@@ -14,21 +13,14 @@ import java.awt.Window
import javax.swing.JTree
@Internal
class ShowHideDebugInfoInUiAction : DumbAwareAction() {
class ShowHideDebugInfoInUiAction : DumbAwareToggleAction() {
override fun getActionUpdateThread(): ActionUpdateThread = ActionUpdateThread.BGT
override fun update(e: AnActionEvent) {
e.presentation.text = if (UISettings.getInstance().showInplaceCommentsInternal) {
ActionsBundle.message("action.ShowHideDebugInfoInUi.text")
}
else {
ActionsBundle.message("action.ShowHideDebugInfoInUi.show.text")
}
}
override fun isSelected(e: AnActionEvent): Boolean = UISettings.getInstance().showInplaceCommentsInternal
override fun actionPerformed(e: AnActionEvent) {
override fun setSelected(e: AnActionEvent, state: Boolean) {
val uiSettings = UISettings.getInstance()
uiSettings.showInplaceCommentsInternal = !uiSettings.showInplaceCommentsInternal
uiSettings.showInplaceCommentsInternal = state
for (tree in UIUtil.uiTraverser(null).withRoots(*Window.getWindows()).filter(JTree::class.java)) {
TreeUtil.invalidateCacheAndRepaint(tree.ui)
}

View File

@@ -1551,8 +1551,7 @@ action.CollectZippedLogs.text=Collect Logs and Diagnostic Data
action.CollectZippedLogs.description=Compress logs and settings into file
action.DeleteOldAppDirs.text=Delete Leftover IDE Directories...
action.DeleteOldAppDirs.description=Looks for settings, cache, and log directories from previous IDE versions
action.ShowHideDebugInfoInUi.text=Hide Debugging Info in UI
action.ShowHideDebugInfoInUi.show.text=Show Debugging Info in UI
action.ShowHideDebugInfoInUi.text=Debugging Info in UI
action.EditCustomProperties.text=Edit Custom Properties...
action.EditCustomProperties.description=Opens an editor tab with a custom properties file
action.EditCustomVmOptions.text=Edit Custom VM Options...

View File

@@ -882,7 +882,6 @@
</action>
<action id="CollectZippedLogs" class="com.intellij.ide.actions.CollectZippedLogsAction"/>
<action id="DeleteOldAppDirs" class="com.intellij.ide.actions.DeleteOldAppDirectoriesAction"/>
<action id="ShowHideDebugInfoInUi" internal="true" class="com.intellij.ide.actions.ShowHideDebugInfoInUiAction"/>
<separator/>
<group id="HelpDiagnosticTools" popup="true">
<action id="Performance.ActivityMonitor" class="com.intellij.ide.actions.ActivityMonitorAction"/>
@@ -1328,6 +1327,7 @@
<abbreviation value="metal"/>
</action>
<action id="RulerGuide" internal="true" class="com.intellij.internal.rulerguide.RulerGuideAction"/>
<action id="ShowHideDebugInfoInUi" internal="true" class="com.intellij.ide.actions.ShowHideDebugInfoInUiAction"/>
<separator/>
<action id="AddTestProcessAction" internal="true" class="com.intellij.openapi.wm.impl.status.AddTestProcessAction"/>
<action id="AddRandomNamesTestProcessAction" internal="true" class="com.intellij.openapi.wm.impl.status.AddRandomNamesTestProcessAction"/>