mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-08 08:52:12 +00:00
Running Spring Boot main-class configurations had no Update action, and incremental Java builds did not publish edited resources to the running JVM. They now share the Update action, toolbar and build runner with Tomcat: resources go through the module's Maven or Gradle build and are published to the resolved runtime classpath, including Gradle's separate jdt.ls output directory. Class updates use scoped HotSwap when available and explain the restart requirement otherwise. Both configuration types get "On 'Update' action" and "On frame deactivation" policies. A missing policy keeps the chooser and does no deactivation update. Focus tracking debounces external changes and prevents overlapping updates. Verified on macOS with Maven, Gradle, Tomcat 10.1 and HotSwap. Windows and Linux focus detection were not run. On Linux a native GTK dialog can count as deactivation when no webview window is focused. Fixes #580
16 lines
576 B
TypeScript
16 lines
576 B
TypeScript
import { tx } from "@/platform/i18n";
|
|
import type { RunConfig } from "@/platform/ipc";
|
|
import { startRun } from "./store";
|
|
|
|
export async function runUpdateBuild(build: RunConfig): Promise<void> {
|
|
let finish!: (ok: boolean) => void;
|
|
const exited = new Promise<boolean>((resolve) => {
|
|
finish = resolve;
|
|
});
|
|
const session = await startRun(build, undefined, undefined, {
|
|
onExit: (code, stopped) => finish(code === 0 && !stopped),
|
|
});
|
|
if (!session || session.status === "failed" || !(await exited))
|
|
throw new Error(tx("Application update build failed"));
|
|
}
|