feat: 为 Java 管理 页面添加了为空提示 (#6961)
This commit is contained in:
1 parent
101257cae8
commit
cccff7effd
4 files changed
+18
-7
No files matched your search
@@ -182,15 +182,23 @@ public final class JavaManagementPage extends ListPageBase<JavaRuntime> {
|
||||
|
||||
@FXThread
|
||||
private void loadJava(Collection<JavaRuntime> javaRuntimes) {
|
||||
if (javaRuntimes != null) {
|
||||
// JavaRuntime equality is path-based. setAll can therefore retain a stale item when the
|
||||
// Java installation at an existing path has been upgraded.
|
||||
this.getItems().clear();
|
||||
this.getItems().addAll(javaRuntimes);
|
||||
this.setLoading(false);
|
||||
} else {
|
||||
if (javaRuntimes == null) {
|
||||
this.setLoading(true);
|
||||
return;
|
||||
}
|
||||
|
||||
// JavaRuntime equality is path-based. setAll can therefore retain a stale item when the
|
||||
// Java installation at an existing path has been upgraded.
|
||||
this.getItems().clear();
|
||||
this.getItems().addAll(javaRuntimes);
|
||||
|
||||
if (javaRuntimes.isEmpty()) {
|
||||
this.setFailedReason(i18n("java.empty"));
|
||||
} else {
|
||||
this.setFailedReason(null);
|
||||
}
|
||||
|
||||
this.setLoading(false);
|
||||
}
|
||||
|
||||
private static final class JavaPageSkin extends ToolbarListPageSkin<JavaRuntime, JavaManagementPage> {
|
||||
|
||||
@@ -857,6 +857,7 @@ java.download.prompt=Please choose the Java version you want to download:
|
||||
java.download.distribution=Distribution
|
||||
java.download.version=Version
|
||||
java.download.packageType=Package Type
|
||||
java.empty=Could not find Java
|
||||
java.management=Java Management
|
||||
java.info.architecture=Architecture
|
||||
java.info.vendor=Vendor
|
||||
|
||||
@@ -675,6 +675,7 @@ java.download.prompt=请选择你要下载的 Java 版本:
|
||||
java.download.distribution=发行版
|
||||
java.download.version=版本
|
||||
java.download.packageType=包类型
|
||||
java.empty=未能找到 Java
|
||||
java.management=Java 管理
|
||||
java.info.architecture=架构
|
||||
java.info.vendor=供应商
|
||||
|
||||
@@ -669,6 +669,7 @@ java.download.prompt=請選擇你要下載的 Java 版本:
|
||||
java.download.distribution=發行版
|
||||
java.download.version=版本
|
||||
java.download.packageType=包類型
|
||||
java.empty=未能找到 Java
|
||||
java.management=Java 管理
|
||||
java.info.architecture=架構
|
||||
java.info.vendor=供應商
|
||||
|
||||
Reference in new issue
Block a user