дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-06 01:57:13 +02:00
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
Цей коміт міститься в:
1 джерело
b27ef431a6
коміт
2cf5f5369f
2 files changed
+68
-66
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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 && (
|
||||
<div
|
||||
className={styles.lifecycleToolbar}
|
||||
role="toolbar"
|
||||
aria-orientation="horizontal"
|
||||
aria-label={tx("Run actions")}
|
||||
>
|
||||
<div className={styles.toolbarGroup}>
|
||||
<IconButton
|
||||
icon="rerun"
|
||||
title="Rerun"
|
||||
shortcut={shortcutLabel("run.rerun")}
|
||||
onClick={() => rerunSession(session.id)}
|
||||
/>
|
||||
<IconButton
|
||||
icon="stop"
|
||||
title={session.status === "stopping" ? tx`Stopping… (click to kill)` : "Stop"}
|
||||
tone={running ? "danger" : "default"}
|
||||
disabled={!running}
|
||||
onClick={() => void stopSession(session.id)}
|
||||
/>
|
||||
<IconButton
|
||||
icon="debug"
|
||||
title="Debug"
|
||||
shortcut={shortcutLabel("run.debug")}
|
||||
onClick={() => void debugSession(session.id)}
|
||||
/>
|
||||
{canUpdateApplication && (
|
||||
<IconButton
|
||||
icon="refresh"
|
||||
title="Update Application"
|
||||
shortcut={shortcutLabel("run.updateApplication")}
|
||||
disabled={session.status !== "running" || updating}
|
||||
onClick={() => showApplicationUpdate(session.id)}
|
||||
/>
|
||||
)}
|
||||
{canDumpThreads && (
|
||||
<IconButton
|
||||
icon="thread-dump"
|
||||
title="Dump Threads"
|
||||
action="run.dumpThreads"
|
||||
actionArg={session.id}
|
||||
disabled={session.status !== "running"}
|
||||
/>
|
||||
)}
|
||||
<IconButton
|
||||
icon="web"
|
||||
title="Open in Browser"
|
||||
disabled={!running}
|
||||
onClick={() => void openUrl(tomcatBrowserUrl(session.config))}
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.toolbarGroup}>
|
||||
<IconButton
|
||||
icon="settings"
|
||||
title="Edit Configurations…"
|
||||
onClick={() => void executeAction("run.editConfigs", session.config.id)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
{showLifecycle && (
|
||||
<div
|
||||
className={styles.lifecycleToolbar}
|
||||
role="toolbar"
|
||||
aria-orientation="horizontal"
|
||||
aria-label={tx("Run actions")}
|
||||
>
|
||||
<div className={styles.toolbarGroup}>
|
||||
<IconButton
|
||||
icon="rerun"
|
||||
title="Rerun"
|
||||
shortcut={shortcutLabel("run.rerun")}
|
||||
onClick={() => rerunSession(session.id)}
|
||||
/>
|
||||
<IconButton
|
||||
icon="stop"
|
||||
title={session.status === "stopping" ? tx`Stopping… (click to kill)` : "Stop"}
|
||||
tone={running ? "danger" : "default"}
|
||||
disabled={!running}
|
||||
onClick={() => void stopSession(session.id)}
|
||||
/>
|
||||
<IconButton
|
||||
icon="debug"
|
||||
title="Debug"
|
||||
shortcut={shortcutLabel("run.debug")}
|
||||
onClick={() => void debugSession(session.id)}
|
||||
/>
|
||||
{canUpdateApplication && (
|
||||
<IconButton
|
||||
icon="refresh"
|
||||
title="Update Application"
|
||||
shortcut={shortcutLabel("run.updateApplication")}
|
||||
disabled={session.status !== "running" || updating}
|
||||
onClick={() => showApplicationUpdate(session.id)}
|
||||
/>
|
||||
)}
|
||||
{canDumpThreads && (
|
||||
<IconButton
|
||||
icon="thread-dump"
|
||||
title="Dump Threads"
|
||||
action="run.dumpThreads"
|
||||
actionArg={session.id}
|
||||
disabled={session.status !== "running"}
|
||||
/>
|
||||
)}
|
||||
<IconButton
|
||||
icon="web"
|
||||
title="Open in Browser"
|
||||
disabled={!running}
|
||||
onClick={() => void openUrl(tomcatBrowserUrl(session.config))}
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.toolbarGroup}>
|
||||
<IconButton
|
||||
icon="settings"
|
||||
title="Edit Configurations…"
|
||||
onClick={() => void executeAction("run.editConfigs", session.config.id)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<Tabs
|
||||
variant="compact"
|
||||
className={styles.subTabs}
|
||||
@@ -604,6 +606,7 @@ export function TomcatSessionPanel({
|
||||
items={TOMCAT_TAB_ITEMS}
|
||||
activeId={activeTab}
|
||||
onSelect={(id) => selectTab(id as TomcatTabId)}
|
||||
trailing={lifecycle || undefined}
|
||||
/>
|
||||
<div
|
||||
className={styles.tabBody}
|
||||
|
||||
Reference in new issue
Заблокувати користувача