дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
feat(java): resolve compiled Kotlin APIs in Maven Java editors (#669)
Java files in mixed Maven projects could not resolve Kotlin types from the same module or upstream reactor modules, because Kotlin compiler output never reached JDT's Java model. A per-project bridge compiles saved Kotlin sources with the project's own Maven setup into private staging output (a bundled Maven extension redirects outputs and records each module's Kotlin compile result) and mounts the Kotlin classes as marked libraries through a bundled JDT command, leaving m2e/JRE containers and other entries untouched. The last successful snapshot stays mounted while rebuilding; a new one is published when every Kotlin target compiles, even if javac fails, so Java callers of a renamed or removed Kotlin API show their errors in the editor. Kotlin compile failures keep the previous API and are reported under the kotlin-bridge Problems source. Removing the last Kotlin file withdraws the libraries. Changes under build outputs and excluded directories never trigger a rebuild. Part of #428
Цей коміт міститься в:
1 джерело
8d38aa4a9c
коміт
9bb44cbeb3
23 files changed
+1874
-10
No files matched your search
@@ -1,4 +1,9 @@
|
||||
{
|
||||
"Kotlin bridge requires a Maven build root": "Kotlin 桥接需要 Maven 构建根目录",
|
||||
"Kotlin bridge bundle is unavailable": "Kotlin 桥接扩展不可用",
|
||||
"Kotlin bridge command did not acknowledge its library snapshot": "Kotlin 桥接命令未确认类库更新",
|
||||
"Maven compilation failed": "Maven 编译失败",
|
||||
"Kotlin editor compilation failed": "Kotlin 编辑器编译失败",
|
||||
"Updating results…": "正在更新结果…",
|
||||
"Uploading files": "正在上传文件",
|
||||
"No files on the clipboard": "剪贴板中没有文件",
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { create } from "zustand";
|
||||
import { call, commands, onIdeEvent } from "@/platform/ipc";
|
||||
import { tx } from "@/platform/i18n";
|
||||
import { useProject } from "@/platform/project";
|
||||
import type { NotificationService } from "./contributions";
|
||||
|
||||
@@ -189,5 +190,8 @@ export const notificationServiceImpl: NotificationService = {
|
||||
};
|
||||
|
||||
export function installNotifyEvents(): () => void {
|
||||
return onIdeEvent("notify", (e) => void notify({ level: e.level, title: e.title, body: e.body ?? undefined }));
|
||||
return onIdeEvent(
|
||||
"notify",
|
||||
(e) => void notify({ level: e.level, title: tx(e.title), body: e.body ? tx(e.body) : undefined }),
|
||||
);
|
||||
}
|
||||
Reference in new issue
Заблокувати користувача