дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-08 19:02:17 +02:00
feat(java): Separate the jdtls JDK and add Settings for New Projects (#21)
- Languages & Frameworks › Java › Language Server › JDK (languages.java.jdtlsJdk) runs jdtls on its own JDK, like IDEA's JDK for importer; the project keeps compiling and running with the Project JDK. - Toolchain pages get the Global / This project switch (default This project); Global shows and edits the global layer. - File › New Projects Setup › Settings for New Projects… edits only the global layer, which new projects inherit. - Configuration errors (launch_error) show as "Not started" instead of "Crashed". Fixes #18 Fixes #19 Claude-Session: https://claude.ai/code/session_01SaPPsVPuk6ZTNsoUCNCbMv
Цей коміт міститься в:
1 джерело
a765959d48
коміт
059f25f13e
38 files changed
+486
-93
No files matched your search
@@ -89,6 +89,6 @@ export function ServerStatus() {
|
||||
function toneOf(status: string): "ok" | "busy" | "error" | "idle" {
|
||||
if (status === "ready") return "ok";
|
||||
if (status === "starting" || status === "busy") return "busy";
|
||||
if (status === "crashed" || status === "missing") return "error";
|
||||
if (status === "crashed" || status === "missing" || status === "misconfigured") return "error";
|
||||
return "idle";
|
||||
}
|
||||
@@ -126,12 +126,13 @@ export const STATUS_LABEL: Record<ServerStatus, string> = {
|
||||
crashed: "Crashed",
|
||||
stopped: "Stopped",
|
||||
missing: "Not installed",
|
||||
misconfigured: "Not started",
|
||||
};
|
||||
|
||||
/** One-line summary for the status bar. */
|
||||
export function serversSummary(servers: readonly ServerEntry[]): { text: string; tone: "ok" | "busy" | "error" | "idle" } | null {
|
||||
if (!servers.length) return null;
|
||||
const bad = servers.filter((s) => s.status === "crashed" || s.status === "missing");
|
||||
const bad = servers.filter((s) => s.status === "crashed" || s.status === "missing" || s.status === "misconfigured");
|
||||
const busy = servers.filter((s) => s.status === "starting" || s.status === "busy");
|
||||
const tone = bad.length ? "error" : busy.length ? "busy" : servers.some((s) => s.status === "ready") ? "ok" : "idle";
|
||||
const names = [...new Set(servers.map((s) => s.name))];
|
||||
|
||||
@@ -44,6 +44,7 @@ describe("serversSummary", () => {
|
||||
expect(serversSummary([s("rust-analyzer", "ready")])).toEqual({ text: "rust-analyzer", tone: "ok" });
|
||||
expect(serversSummary([s("vtsls", "ready"), s("eslint", "starting")])).toEqual({ text: "vtsls +1", tone: "busy" });
|
||||
expect(serversSummary([s("gopls", "missing")])!.tone).toBe("error");
|
||||
expect(serversSummary([s("jdtls", "misconfigured")])!.tone).toBe("error");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Заблокувати користувача