From 2cf5f5369f2c0495ca21063b6a3bb97a0cb9cad6 Mon Sep 17 00:00:00 2001 From: l0ng-ai Date: Fri, 4 Dec 2026 13:59:34 +0800 Subject: [PATCH] fix(run): put a Tomcat run tab's toolbar in its tab row (#7949) The Tomcat run tab showed its Rerun / Stop / Debug / Update / Open in Browser toolbar on a row of its own above the Server, Deployment and log tabs. The toolbar now follows those tabs in their row, with Edit Configurations at the end, so the output gets that row back. Closes #7912 --- src/features/run/TomcatSession.module.css | 9 +- src/features/run/TomcatSessionPanel.tsx | 125 +++++++++++----------- 2 files changed, 68 insertions(+), 66 deletions(-) diff --git a/src/features/run/TomcatSession.module.css b/src/features/run/TomcatSession.module.css index 1986594896..8b1d713828 100644 --- a/src/features/run/TomcatSession.module.css +++ b/src/features/run/TomcatSession.module.css @@ -8,13 +8,12 @@ } .lifecycleToolbar { - flex: none; + flex: 1; display: flex; - flex-wrap: wrap; align-items: center; - gap: var(--space-0-5) var(--space-2); - padding: var(--space-0-5) var(--space-1); - border-bottom: 1px solid var(--border); + justify-content: space-between; + gap: var(--space-2); + padding: 0 var(--space-1) 0 var(--space-2); } .toolbarGroup { diff --git a/src/features/run/TomcatSessionPanel.tsx b/src/features/run/TomcatSessionPanel.tsx index 8282603d8e..fcf6c87842 100644 --- a/src/features/run/TomcatSessionPanel.tsx +++ b/src/features/run/TomcatSessionPanel.tsx @@ -533,69 +533,71 @@ export function TomcatSessionPanel({ const canUpdateApplication = isUpdatable(session.config); const canDumpThreads = isJvmRun(session.config); + // In the tab row, after the tabs, as IDEA puts a run tab's toolbar beside its content tabs. + const lifecycle = showLifecycle && ( +
+
+ rerunSession(session.id)} + /> + void stopSession(session.id)} + /> + void debugSession(session.id)} + /> + {canUpdateApplication && ( + showApplicationUpdate(session.id)} + /> + )} + {canDumpThreads && ( + + )} + void openUrl(tomcatBrowserUrl(session.config))} + /> +
+
+ void executeAction("run.editConfigs", session.config.id)} + /> +
+
+ ); + return (
- {showLifecycle && ( -
-
- rerunSession(session.id)} - /> - void stopSession(session.id)} - /> - void debugSession(session.id)} - /> - {canUpdateApplication && ( - showApplicationUpdate(session.id)} - /> - )} - {canDumpThreads && ( - - )} - void openUrl(tomcatBrowserUrl(session.config))} - /> -
-
- void executeAction("run.editConfigs", session.config.id)} - /> -
-
- )} selectTab(id as TomcatTabId)} + trailing={lifecycle || undefined} />