дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
fix(build-tools): running a goal or task from the tool window leaves the selected configuration alone (#8028)
Running a Maven goal or Gradle task from its tool window went through run.runConfig with a temporary configuration, and adoptTemporary always selected it, so the just-run goal replaced the configuration selected in the Run Configurations dropdown. The tool window now passes select: false and adoptTemporary only selects when asked; editor and gutter runs still select their temporary configuration. Fixes #8016 Co-authored-by: Inf1mum <[email protected]>
Цей коміт міститься в:
1 джерело
1f8cf7e3a8
коміт
2cad48b401
5 files changed
+41
-11
No files matched your search
@@ -736,6 +736,17 @@ describe("temporary configurations", () => {
|
||||
expect(useRun.getState().temporary).toEqual([]);
|
||||
});
|
||||
|
||||
it("leave the selected configuration alone when the run asks not to select (Maven / Gradle tool windows)", () => {
|
||||
useRun.setState({ selectedId: "maven:spring-boot:run" });
|
||||
const goal = cfg({ id: "maven:clean", kind: "maven", command: "./mvnw", args: ["clean"], cwd: "/p" });
|
||||
adoptTemporary(goal, false);
|
||||
expect(useRun.getState().selectedId).toBe("maven:spring-boot:run");
|
||||
expect(useRun.getState().temporary).toEqual([goal.id]);
|
||||
// The default still selects: editor-context runs rely on it.
|
||||
const app = adoptTemporary(applicationConfig({ className: "a.Main" }, "src/main/java/a/Main.java"));
|
||||
expect(useRun.getState().selectedId).toBe(app.id);
|
||||
});
|
||||
|
||||
it("reuse a configuration of the same main class and module, whatever its id", () => {
|
||||
const own = (module: string) =>
|
||||
cfg({
|
||||
|
||||
Reference in new issue
Заблокувати користувача