diff --git a/backend/src/jdtls.rs b/backend/src/jdtls.rs index ff00c05..392f211 100644 --- a/backend/src/jdtls.rs +++ b/backend/src/jdtls.rs @@ -243,7 +243,7 @@ pub fn manifest_java_version(manifest: &str) -> Option { /// The one Equinox launcher JAR in `directory`. None or several mean the /// folder is no usable installation. -fn launcher_in(directory: &Path) -> Option { +pub(crate) fn launcher_in(directory: &Path) -> Option { let mut launchers: Vec = fs::read_dir(directory) .ok()? .filter_map(Result::ok) @@ -312,12 +312,58 @@ pub fn locate_for_runtime( /// The folders [`locate`] tries without a configured one, in order. A folder /// may hold no installation; [`inspect`] decides. pub fn candidates(environment: &SearchEnvironment, os: &str) -> Vec { + candidate_sources(environment, os) + .into_iter() + .map(|(_, path)| path) + .collect() +} + +/// Identifies where each candidate came from, in the same order used to launch. +pub(crate) fn candidate_sources( + environment: &SearchEnvironment, + os: &str, +) -> Vec<(&'static str, PathBuf)> { let mut folders = Vec::new(); - folders.extend(environment.server_home.clone()); - folders.extend(launcher_installations(environment.path.as_ref(), os)); - folders.extend(package_manager_folders(environment, os)); + folders.extend( + environment + .server_home + .clone() + .map(|path| ("JDTLS_HOME", path)), + ); + folders.extend( + launcher_installations(environment.path.as_ref(), os) + .into_iter() + .map(|path| ("PATH", path)), + ); + folders.extend( + package_manager_folders(environment, os) + .into_iter() + .map(|path| ("package", path)), + ); if let Some(home) = &environment.home { - folders.extend(editor_extension_servers(home)); + folders.extend( + editor_extension_servers(home) + .into_iter() + .map(|path| ("extension", path)), + ); + if os == "macos" { + // Other editors can install the server at this fixed depth. Probe only this + // suffix, never descend through an application's other data. + if let Ok(entries) = fs::read_dir(home.join("Library/Application Support")) { + let mut servers: Vec<_> = entries + .take(256) + .filter_map(Result::ok) + .map(|entry| entry.path().join("tools/jdtls")) + .filter(|server| server.is_dir()) + .collect(); + servers.sort(); + folders.extend( + servers + .into_iter() + .map(|path| ("Application Support", path)), + ); + } + } } folders } @@ -596,6 +642,21 @@ mod tests { ); } + #[test] + fn macos_application_tools_are_discovered_only_at_the_reported_depth() { + let temp = TempDir::new(); + let support = temp.0.join("Library/Application Support"); + let home = support.join("An Editor/tools/jdtls"); + install(&home, &["config_mac_arm"]); + let nested = support.join("Another/nested/tools/jdtls"); + install(&nested, &["config_mac_arm"]); + let environment = environment(&temp.0); + let found = candidates(&environment, "macos"); + assert!(found.contains(&home)); + assert!(!found.contains(&nested)); + assert!(!candidates(&environment, "windows").contains(&home)); + } + #[test] fn jdtls_home_comes_before_the_other_folders() { let temp = TempDir::new(); diff --git a/backend/src/launch.rs b/backend/src/launch.rs index 541785c..573ebff 100644 --- a/backend/src/launch.rs +++ b/backend/src/launch.rs @@ -894,6 +894,25 @@ pub fn resolve_launch_function( answer["initializationOptions"]["settings"] = configuration; } context.check_cancelled()?; + if let Some(workspace) = context.workspace_context() { + let jdk = ¶ms["runtimes"]["jdk"]; + if let (Some(version), Some(home), Some(server_version)) = ( + jdk["version"].as_str(), + jdk["home"].as_str(), + params["runtimes"]["jdtls"]["version"].as_str(), + ) { + session.record_service_environment( + workspace, + params["settings"][SERVER_HOME_SETTING] + .as_str() + .unwrap_or(""), + [ + format!("JDT LS {server_version} · {}", server.home.display()), + format!("JDK {version} · {home}"), + ], + ); + } + } Ok(answer) } diff --git a/backend/src/lib.rs b/backend/src/lib.rs index 3fadc8f..606084b 100644 --- a/backend/src/lib.rs +++ b/backend/src/lib.rs @@ -289,12 +289,13 @@ pub fn backend() -> Result { })?; backend.suppress_success_diagnostics(function)?; } + let view_session = Arc::clone(&session); backend.function("compiler.prepareSettings", move |params, context| { projects.edit(params, context, &session) })?; backend.function( settings_view::SETTINGS_VIEW_FUNCTION_ID, - settings_view::view_function, + move |params, context| settings_view::view_function(&view_session, params, context), )?; backend.suppress_success_diagnostics(settings_view::SETTINGS_VIEW_FUNCTION_ID)?; Ok(backend) diff --git a/backend/src/managed_runtimes.rs b/backend/src/managed_runtimes.rs index 3295127..48c8b12 100644 --- a/backend/src/managed_runtimes.rs +++ b/backend/src/managed_runtimes.rs @@ -286,9 +286,13 @@ pub fn inspect_jdk(home: &Path, os: &str, arch: &str) -> Option<(PathBuf, String Some((home, version.to_owned())) } +fn matches_size(home: &Path, pin: &PinnedFile) -> bool { + fs::metadata(home.join(&pin.path)).is_ok_and(|m| m.is_file() && m.len() == pin.size) +} + fn matches_file(home: &Path, pin: &PinnedFile) -> bool { let path = home.join(&pin.path); - if !fs::metadata(&path).is_ok_and(|metadata| metadata.is_file() && metadata.len() == pin.size) { + if !matches_size(home, pin) { return false; } let Ok(file) = File::open(path) else { @@ -313,6 +317,17 @@ fn inspect_server_with( arch: &str, profile: &ServerProfile, check_cancelled: &dyn Fn() -> Result<(), FunctionError>, +) -> Result, FunctionError> { + inspect_layout(home, os, arch, profile, check_cancelled, matches_file) +} + +fn inspect_layout( + home: &Path, + os: &str, + arch: &str, + profile: &ServerProfile, + check_cancelled: &dyn Fn() -> Result<(), FunctionError>, + matches: fn(&Path, &PinnedFile) -> bool, ) -> Result, FunctionError> { let Some(configuration) = jdtls::configuration_name(os, arch) else { return Ok(None); @@ -348,7 +363,7 @@ fn inspect_server_with( }; for pin in std::iter::once(config).chain(&profile.files) { check_cancelled()?; - if !matches_file(&server.home, pin) { + if !matches(&server.home, pin) { return Ok(None); } } @@ -365,6 +380,111 @@ pub fn inspect_server( inspect_server_with(home, os, arch, &ServerProfile::pinned()?, check_cancelled) } +/// Checks local server candidates only when requested from settings. A successful +/// local probe is not a claim that the host chose it over a managed installation. +pub fn check_local_servers( + configured: &str, + zh: bool, + check_cancelled: &dyn Fn() -> Result<(), FunctionError>, +) -> Result, FunctionError> { + let os = std::env::consts::OS; + let arch = match std::env::consts::ARCH { + "aarch64" => "arm64", + arch => arch, + }; + let profile = ServerProfile::pinned()?; + let explicit = !configured.is_empty(); + let homes = if explicit { + vec![("setting", PathBuf::from(configured))] + } else { + jdtls::candidate_sources(&SearchEnvironment::current(), os) + }; + let mut lines = Vec::new(); + let mut seen = BTreeSet::new(); + let limited = homes.len() > MAX_DISCOVERED_SERVERS; + for (source, home) in homes.into_iter().take(MAX_DISCOVERED_SERVERS) { + check_cancelled()?; + if !seen.insert(home.clone()) { + continue; + } + let (en, cn) = if !explicit && !home.is_dir() { + ("Folder not found", "未找到目录") + } else if home.is_absolute() + && inspect_layout(&home, os, arch, &profile, check_cancelled, matches_size)?.is_some() + { + ( + "Layout matches 1.61.0; Toolchains verifies file contents", + "目录结构符合 1.61.0,可在工具链页校验文件内容", + ) + } else { + server_rejection(&home, os, arch) + }; + let origin = match (source, zh) { + ("setting", true) => "手动选择", + ("setting", false) => "Selected folder", + ("package", true) => "包管理器", + ("package", false) => "Package manager", + ("extension", true) => "编辑器扩展", + ("extension", false) => "Editor extension", + _ => source, + }; + lines.push(format!( + "{origin} · {} · {}", + home.display(), + if zh { cn } else { en } + )); + } + if lines.is_empty() { + lines.push(if zh { + "在已检查的位置未找到本机 JDT LS。可选择语言服务器目录,或使用工具链页准备托管环境。" + } else { + "No local JDT LS found in the checked locations. Choose a server folder or prepare the managed environment in Toolchains." + }.into()); + } + if limited { + lines.push( + if zh { + "已达到 32 个候选目录的检查上限。" + } else { + "Checked the first 32 candidate folders." + } + .into(), + ); + } + Ok(lines) +} + +fn server_rejection(home: &Path, os: &str, arch: &str) -> (&'static str, &'static str) { + if !home.is_absolute() || !home.is_dir() { + return ( + "Choose an existing absolute server folder", + "请选择存在的语言服务器绝对路径", + ); + } + let roots = [home.to_path_buf(), home.join("libexec")]; + if let Some(config) = jdtls::configuration_name(os, arch) { + if !roots + .iter() + .any(|root| root.join(config).join("config.ini").is_file()) + { + return ("Missing platform config.ini", "缺少当前平台的 config.ini"); + } + } + if !roots + .iter() + .any(|root| jdtls::launcher_in(&root.join("plugins")).is_some()) + { + return ( + "Expected one Equinox launcher JAR", + "需要一个 Equinox 启动 JAR", + ); + } + ( + "Files differ from verified JDT LS 1.61.0", + "文件与已验证的 JDT LS 1.61.0 不一致", + ) +} + fn resolve_with( params: &Value, environment: &SearchEnvironment, @@ -442,9 +562,12 @@ Choose a valid JDK or clear its toolchain override to use the managed runtime.", let candidates = absolute(params["candidates"].get(JDTLS_ID)) .into_iter() .chain( - jdtls::candidates(environment, os) - .into_iter() - .take(MAX_DISCOVERED_SERVERS), + std::iter::once_with(|| { + jdtls::candidates(environment, os) + .into_iter() + .take(MAX_DISCOVERED_SERVERS) + }) + .flatten(), ); let mut found = None; let mut seen = BTreeSet::new(); @@ -474,7 +597,8 @@ Choose a valid JDK or clear its toolchain override to use the managed runtime.", /// invalid explicit configuration is an SDK-reported error. Cancellation is /// checked between each bounded file read and never becomes a failure log. pub fn resolve_runtimes_function(params: Value, context: &Context) -> Result { - localize_result( + let language = params["language"].as_str().unwrap_or_default(); + let result = localize_result( (|| { resolve_with( ¶ms, @@ -483,8 +607,26 @@ pub fn resolve_runtimes_function(params: Value, context: &Context) -> Result, native_root: Option, + // Verified paths from the last launch resolution, scoped to its workspace generation. + service_environment: Option<(u64, String, [String; 2])>, /// The project model settings of the last launch; every push detects /// the model with them, so a push never undoes what the launch configured. model_options: crate::project_model::ModelOptions, @@ -301,6 +303,7 @@ impl WorkspaceState { contributions: Contributions::default(), java_runtimes: Vec::new(), native_root: None, + service_environment: None, model_options: crate::project_model::ModelOptions::default(), pending_projects: Vec::new(), collecting: None, @@ -850,6 +853,36 @@ impl SettingsSession { .unwrap_or_default() } + pub fn record_service_environment( + &self, + workspace: &WorkspaceContext, + configured: &str, + lines: [String; 2], + ) { + let mut states = self.lock_states(); + let state = states + .entry(workspace.context_id().to_owned()) + .or_insert_with(|| WorkspaceState::new(workspace.clone())); + if workspace.generation() >= state.context.generation() { + state.remember_context(workspace); + state.service_environment = + Some((workspace.generation(), configured.to_owned(), lines)); + } + } + + pub fn service_environment( + &self, + workspace: &WorkspaceContext, + configured: &str, + ) -> Option<[String; 2]> { + let states = self.lock_states(); + let (generation, selection, lines) = states + .get(workspace.context_id())? + .service_environment + .as_ref()?; + (*generation == workspace.generation() && selection == configured).then(|| lines.clone()) + } + /// Remembers the JDKs a launch of the workspace `workspace` configured, /// so a later push repeats them instead of leaving the server with the /// runtimes of an older launch. A workspace the session has not seen is @@ -1089,6 +1122,25 @@ mod tests { WorkspaceContext::new("ctx-1", 1).expect("a valid context") } + #[test] + fn service_environment_follows_workspace_generation_and_server_selection() { + let (_, session) = fixture(); + let old = workspace(); + let current = WorkspaceContext::new("ctx-1", 2).unwrap(); + let lines = ["JDT LS".to_owned(), "JDK".to_owned()]; + session.record_service_environment(¤t, "selected", lines.clone()); + session.record_service_environment(&old, "", ["old".to_owned(), "jdk".to_owned()]); + assert_eq!( + session.service_environment(¤t, "selected"), + Some(lines) + ); + assert!(session.service_environment(¤t, "").is_none()); + assert!(session.service_environment(&old, "selected").is_none()); + assert!(session + .service_environment(&WorkspaceContext::new("other", 2).unwrap(), "selected") + .is_none()); + } + fn state_of(server: &str, state: &str, generation: u64) -> Value { json!({ "context": { "contextID": "ctx-1", "generation": 1 }, diff --git a/backend/src/settings_view.rs b/backend/src/settings_view.rs index 632b052..cfdb1f1 100644 --- a/backend/src/settings_view.rs +++ b/backend/src/settings_view.rs @@ -70,13 +70,19 @@ const HEAP_MAX_MB: i64 = 16384; /// Handles a `settings.view` invocation from the host. /// -/// Redraws on `open`, `settings`, and `resize` events; returns `{}` for `close` -/// and other non-layout events so the host retains the last view or closes it -/// without error. -pub fn view_function(params: Value, context: &Context) -> Result { +/// Ordinary redraws only present state. An explicit check inspects local +/// server layouts; full content verification belongs to runtime preparation. +pub fn view_function( + session: &crate::settings_session::SettingsSession, + params: Value, + context: &Context, +) -> Result { context.check_cancelled()?; let request = parse_request(¶ms)?; - if !matches!(request.event, "open" | "settings" | "resize") { + let check = request.region == LANGUAGE_REGION + && request.event == "click" + && params["node"] == "check-jdtls"; + if !check && !matches!(request.event, "open" | "settings" | "resize") { return Ok(json!({})); } let words = words_for_language(request.language); @@ -99,7 +105,42 @@ pub fn view_function(params: Value, context: &Context) -> Result format!("JDK for JDT LS · Java Support · {jdk} · {server}"), + None => format!("JDK for JDT LS · Java Support · {}", words.no_launch), + }; + view.push(json!({"type":"button", "id":"read-project-structure", + "action":"libraries", "text":words.read_structure})); + let mut controls = vec![json!({"type":"row", "children":[ + {"type":"textField", "id":"java-environment", "label":words.environment_title, + "info":words.environment_help, "value":environment, "enabled":false, "width":"fill"}, + {"type":"button", "id":"check-jdtls", "text":words.check_server} + ]})]; + let caption = |text: &str| json!({"type":"label", "style":"caption", "text":text}); + if check { + let lines = crate::managed_runtimes::check_local_servers(configured, zh, &|| { + context.check_cancelled().map_err(Into::into) + })?; + controls.extend(lines.iter().map(|line| caption(line))); + } + controls.extend([ + json!({"type":"setting", "setting":"heapMaxMB"}), + json!({"type":"setting", "setting":"languageServerHome"}), + json!({"type":"setting", "setting":"logLevel"}), + ]); + view.push( + json!({"type":"section", "title":words.language_server_section, + "children":controls}), + ); + } + Ok(json!({ "view": view })) } struct ParsedRequest<'a> { @@ -296,6 +337,12 @@ fn read_settings( } struct Words { + language_server_section: &'static str, + read_structure: &'static str, + environment_title: &'static str, + environment_help: &'static str, + check_server: &'static str, + no_launch: &'static str, preview_title: &'static str, preview_label: &'static str, follows_options: &'static str, @@ -344,6 +391,12 @@ struct Words { } const ZH: Words = Words { + language_server_section: "语言服务器", + read_structure: "读取项目结构", + environment_title: "Java 环境", + environment_help: "检查目录会读取本机的语言服务器文件。工具链页可校验完整文件或准备缺失组件。", + check_server: "检查", + no_launch: "尚无启动检查结果", preview_title: "效果预览", preview_label: "Java 语言服务器与工程模型设置预览", follows_options: "示例代码,随下方选项即时变化", @@ -397,6 +450,12 @@ const ZH: Words = Words { }; const EN: Words = Words { + language_server_section: "Language server", + read_structure: "Read project structure", + environment_title: "Java environment", + environment_help: "Check local language server files here. Open Toolchains to verify their contents or prepare missing components.", + check_server: "Check", + no_launch: "No launch check recorded", preview_title: "Preview", preview_label: "Preview of Java language server and project model settings", follows_options: "Sample preview; follows the options below", diff --git a/backend/tests/session.rs b/backend/tests/session.rs index 7c456be..23d9412 100644 --- a/backend/tests/session.rs +++ b/backend/tests/session.rs @@ -299,6 +299,53 @@ fn the_backend_reports_restricted_facts_and_suppresses_reads() { ); } +#[test] +fn java_settings_checks_a_selected_folder_only_after_the_button_click() { + let mut host = Host::start(); + host.initialize(); + let mut event = json!({ + "event":"open", "language":"zh-Hans", "surface":{"settingRegionID":"language"}, + "settings":{"effective":{"languageServerHome":"invalid-relative-path"}} + }); + let opened = host.invoke(1, "settings.view", event.clone()); + let nodes = opened["result"]["view"] + .as_array() + .expect("language settings view"); + assert_eq!(nodes[0]["type"], "canvas"); + assert_eq!(nodes[1]["action"], "libraries"); + let section = &nodes[2]; + assert_eq!(section["title"], "语言服务器"); + let controls = section["children"].as_array().unwrap(); + assert_eq!(controls[1]["setting"], "heapMaxMB"); + assert_eq!(controls[2]["setting"], "languageServerHome"); + assert_eq!(controls[3]["setting"], "logLevel"); + let row = &controls[0]["children"]; + assert_eq!(row[0]["type"], "textField"); + assert_eq!(row[0]["label"], "Java 环境"); + assert_eq!(row[0]["enabled"], false); + assert!(row[0]["value"] + .as_str() + .unwrap() + .contains("JDK for JDT LS · Java Support")); + assert!(row[0]["info"].as_str().is_some_and(|s| !s.is_empty())); + assert_eq!(row[1]["id"], "check-jdtls"); + assert_eq!(row[1]["text"], "检查"); + assert_eq!(row.as_array().unwrap().len(), 2); + event["event"] = json!("click"); + event["node"] = json!("check-jdtls"); + let checked = host.invoke(2, "settings.view", event); + let checked_rows = checked["result"]["view"][2]["children"].as_array().unwrap(); + assert!(checked_rows.iter().all(|node| node["type"] != "tool")); + assert!(checked["result"]["view"][2]["children"] + .as_array() + .unwrap() + .iter() + .any(|n| n["text"] + .as_str() + .is_some_and(|s| s.contains("invalid-relative-path") && s.contains("绝对路径")))); + assert_eq!(host.close(), 1); +} + #[test] fn initialize_without_lithe_logging_is_refused() { let mut host = Host::start(); diff --git a/docs/feature-matrix.md b/docs/feature-matrix.md index e94d482..55ea360 100644 --- a/docs/feature-matrix.md +++ b/docs/feature-matrix.md @@ -20,6 +20,7 @@ | 能力 | macOS | Windows | Linux | 证据 | | --- | --- | --- | --- | --- | +| Java 设置显示上次启动检查的路径,在同一行显示服务 JDK 信息并按需检查本机目录;macOS 还查找用户应用数据目录下固定深度的 `tools/jdtls` | implemented / pending | implemented / pending | implemented / pending | `backend/src/jdtls.rs`、`managed_runtimes.rs`、`settings_view.rs`;各平台原生界面待验收 | | 完整 JDK 25 与固定 JDT LS 分别声明,已有依赖复用,只下载缺失部分 | implemented / pending | implemented / pending | x64 verified;ARM64 pending | `managed_runtimes` 单元测试覆盖四种存在组合;真实宿主安装结果见 [运行环境说明](managed-runtimes.md) | | JDT LS 精确 114 文件 + 当前平台模板校验,拒绝混装/残缺;完整 JDK 的版本、OS、CPU、java/javac 执行文件检查 | implemented / pending | implemented / pending | x64 verified;ARM64 pending | 六平台文件布局与 ELF / Mach-O / PE 头单测;Linux 用官方归档及真实 SDK hook | | 服务 JDK 25 独立于项目 JDK;显式选择优先,再复用受管缓存,最后自动发现 | implemented / pending | implemented / pending | x64 verified;ARM64 pending | `backend/src/managed_runtimes.rs`、`repository_pins.rs`;真实 launch 只绑定 `jdtls-runtime` | diff --git a/docs/managed-runtimes.md b/docs/managed-runtimes.md index 753a129..00a4de8 100644 --- a/docs/managed-runtimes.md +++ b/docs/managed-runtimes.md @@ -16,6 +16,10 @@ JDT LS 归档 SHA-256 为 `338e7e73d61836651ba2453919a0d34fa763eb4e7c03342092309 ## 选择与准备 +在“语言与框架 → Java → 语言服务器”找到“Java 环境”。只读框显示上次启动检查选用的服务和 JDK,首次启动前显示尚无结果。点击右侧的“检查”可查看所选目录,或查看自动候选的来源、路径及目录检查结果。目录检查读取文件名和大小。启动与工具链校验仍核对内容指纹。 + +macOS 还会在用户的 `Library/Application Support` 下最多读取 256 个直属条目,只检查每项的 `tools/jdtls`。若安装位置超出范围,可直接选择目录。在“构建、执行、部署 → 工具链”中可以准备或校验缺少的组件。项目编译用的 JDK 单独设置。 + `java.resolveRuntimes` 是包内 Rust 后端提供的只读函数。它不联网、不下载、不执行候选程序、不修改安装目录;宿主负责官方归档的下载、SHA-256 校验、安全解包、文件清单、并发锁和完成记录。 解析顺序是显式用户选择、已有受管候选、自动发现。服务 JDK 的显式选择来自宿主工具链事实;JDT LS 的显式选择来自 `languageServerHome`。显式配置无效时给出中英恢复提示,不悄悄覆盖用户选择。普通缺失会返回 `missing` 列表,是正常安装计划。 diff --git a/io.github.lithe-idea.java-support/plugin.json b/io.github.lithe-idea.java-support/plugin.json index 5dc513c..392c4a8 100644 --- a/io.github.lithe-idea.java-support/plugin.json +++ b/io.github.lithe-idea.java-support/plugin.json @@ -745,9 +745,6 @@ "description": "Optional folder of the verified Eclipse JDT Language Server 1.61.0. Leave empty to reuse a compatible installation or let Lithe prepare the pinned server and its separate Java 25 runtime. This does not change the project JDK.", "default": "", "placeholder": "Automatic", - "page": { - "languageID": "java" - }, "section": "Language server" }, { @@ -759,7 +756,6 @@ "minimum": 2048, "maximum": 16384, "unit": "MB", - "page": {"languageID": "java"}, "section": "Language server" }, { @@ -774,7 +770,6 @@ { "value": "WARNING", "title": "Warnings" }, { "value": "SEVERE", "title": "Errors only" } ], - "page": {"languageID": "java"}, "section": "Language server" }, { @@ -1071,7 +1066,7 @@ ] } ], - "settingActions": [{"id": "compiler", "title": "Read compiler settings", "description": "Read actual Eclipse JDT project settings. Save writes the displayed native preferences or library configuration files.", "function": "compiler.settings", "sourceEditor": {"editFunction": "compiler.prepareSettings", "languageID": "java"}, "page": {"compilerID": "java"}}, {"id": "libraries", "title": "Read project structure", "description": "Read each module's source folders, output folder, JRE and dependencies. Save writes Eclipse .classpath files and the library configuration files shown; Maven and Gradle modules are read-only.", "function": "libraries.settings", "sourceEditor": {"editFunction": "compiler.prepareSettings", "languageID": "java"}, "page": {"languageID": "java"}}], + "settingActions": [{"id": "compiler", "title": "Read compiler settings", "description": "Read actual Eclipse JDT project settings. Save writes the displayed native preferences or library configuration files.", "function": "compiler.settings", "sourceEditor": {"editFunction": "compiler.prepareSettings", "languageID": "java"}, "page": {"compilerID": "java"}}, {"id": "libraries", "title": "Read project structure", "description": "Read each module's source folders, output folder, JRE and dependencies. Save writes Eclipse .classpath files and the library configuration files shown; Maven and Gradle modules are read-only.", "function": "libraries.settings", "sourceEditor": {"editFunction": "compiler.prepareSettings", "languageID": "java"}}], "settingRegions": [ { "id": "language",