mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
IJPL-165501 Disable the "Open in Editor" option in the tool windows menu by default
GitOrigin-RevId: dc3f4ec53bad3000e4518b25e43c01802197e655
This commit is contained in:
committed by
intellij-monorepo-bot
parent
826de1168c
commit
8e1112bb20
@@ -8,6 +8,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.openapi.vfs.VirtualFileManager
|
||||
import com.intellij.openapi.vfs.newvfs.events.VFileDeleteEvent
|
||||
import com.intellij.openapi.wm.ToolWindow
|
||||
@@ -20,7 +21,7 @@ import java.util.*
|
||||
|
||||
internal class MoveToolWindowTabToEditorAction : ToolWindowContextMenuActionBase() {
|
||||
override fun update(e: AnActionEvent, toolWindow: ToolWindow, content: Content?) {
|
||||
val enabled = content != null
|
||||
val enabled = content != null && Registry.`is`("toolwindow.open.tab.in.editor")
|
||||
e.presentation.isEnabledAndVisible = enabled
|
||||
if (!enabled) return
|
||||
e.presentation.text = when {
|
||||
|
||||
@@ -2088,6 +2088,8 @@ toolwindow.active.tab.contrast.background.color.description=Contrast color for s
|
||||
toolwindow.disable.overlay.by.double.key=false
|
||||
toolwindow.disable.overlay.by.double.key.description=If Toolwindow Stripe button panels are hidden, you can invoke them by double Alt/Meta (hold)
|
||||
toolwindow.enable.show.names=true
|
||||
toolwindow.open.tab.in.editor=false
|
||||
toolwindow.open.tab.in.editor.description=Enables "Open in Editor Tab" action
|
||||
|
||||
linux.kernel.variables.validate.every.time=true
|
||||
linux.kernel.variables.validate.every.time.description=Check that kernel variables required to run profiler are set before every profiler start
|
||||
|
||||
@@ -36,7 +36,7 @@ public abstract class OpenAnotherLogTabAction extends DumbAwareAction {
|
||||
@Override
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
Project project = e.getProject();
|
||||
if (project == null) {
|
||||
if (project == null || Registry.is("toolwindow.open.tab.in.editor")) {
|
||||
e.getPresentation().setEnabledAndVisible(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.intellij.openapi.fileEditor.FileEditorManager
|
||||
import com.intellij.openapi.fileEditor.impl.FileEditorManagerImpl
|
||||
import com.intellij.openapi.project.DumbAware
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.registry.Registry
|
||||
import com.intellij.terminal.JBTerminalWidget
|
||||
import com.intellij.terminal.ui.TerminalWidget
|
||||
import com.intellij.ui.content.Content
|
||||
@@ -16,6 +17,7 @@ import org.jetbrains.plugins.terminal.vfs.TerminalSessionVirtualFileImpl
|
||||
private class MoveTerminalSessionToEditorAction : TerminalSessionContextMenuActionBase(), DumbAware {
|
||||
override fun updateInTerminalToolWindow(e: AnActionEvent, project: Project, content: Content, terminalWidget: TerminalWidget) {
|
||||
e.presentation.isEnabledAndVisible = !TerminalToolWindowManager.getInstance(project).isSplitTerminal(terminalWidget)
|
||||
&& !Registry.`is`("toolwindow.open.tab.in.editor")
|
||||
}
|
||||
|
||||
override fun actionPerformedInTerminalToolWindow(e: AnActionEvent, project: Project, content: Content, terminalWidget: TerminalWidget) {
|
||||
|
||||
Reference in New Issue
Block a user