Skip to content

Commit 6eb6807

Browse files
committed
添加插件下载后刷新表格
1 parent b3541bf commit 6eb6807

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/java/com/xwintop/xJavaFxTool/controller/index/PluginManageController.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ protected void updateItem(String item, boolean empty) {
7777
downloadButton.setOnMouseClicked((me) -> {
7878
try {
7979
pluginManageService.downloadPluginJar(dataRow);
80+
dataRow.put("isEnableTableColumn","true");
8081
dataRow.put("isDownloadTableColumn", "已下载");
8182
downloadButton.setText("已下载");
8283
downloadButton.setDisable(true);
84+
pluginDataTableView.refresh();
8385
TooltipUtil.showToast("插件 " + dataRow.get("nameTableColumn") + " 下载完成");
8486
} catch (Exception e) {
8587
log.error("下载插件失败:", e);

src/main/java/com/xwintop/xJavaFxTool/services/index/PluginManageService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import com.alibaba.fastjson.JSONObject;
77
import com.xwintop.xJavaFxTool.controller.index.PluginManageController;
88
import com.xwintop.xJavaFxTool.model.PluginJarInfo;
9-
import com.xwintop.xcore.util.ConfigureUtil;
109
import com.xwintop.xcore.util.javafx.TooltipUtil;
1110
import lombok.Getter;
1211
import lombok.Setter;
@@ -115,7 +114,7 @@ public void selectPluginAction() {
115114

116115
/*加载插件列表*/
117116
public static void reloadPluginJarList() {
118-
File systemPluginListfile = ConfigureUtil.getConfigureFile("system_plugin_list.json");
117+
File systemPluginListfile = new File("system_plugin_list.json");
119118
if (systemPluginListfile.exists()) {
120119
try {
121120
List<PluginJarInfo> pluginJarInfoList = JSON.parseArray(FileUtils.readFileToString(systemPluginListfile, "utf-8"), PluginJarInfo.class);
@@ -130,7 +129,7 @@ public static void reloadPluginJarList() {
130129

131130
/*保存插件列表*/
132131
public static void savePluginJarList() {
133-
File systemPluginListfile = ConfigureUtil.getConfigureFile("system_plugin_list.json");
132+
File systemPluginListfile = new File("system_plugin_list.json");
134133
String systemPluginListString = JSON.toJSONString(PLUGIN_JAR_INFO_MAP.values());
135134
try {
136135
FileUtils.writeStringToFile(systemPluginListfile, systemPluginListString, "utf-8");

src/main/java/com/xwintop/xJavaFxTool/utils/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
public class Config {
99
public static Locale defaultLocale = Locale.getDefault();// 设置系统语言
1010

11-
public static final String xJavaFxToolVersions = "V0.2.0-beta1";// xJavaFxTool版本信息
11+
public static final String xJavaFxToolVersions = "V0.2.0-beta2";// xJavaFxTool版本信息
1212
public static final int xJavaFxToolVersionsInteger = 12;// xJavaFxTool更新信息
1313
}

0 commit comments

Comments
 (0)