From 212bcef93f38d2e69d015862f817e29c7517fc11 Mon Sep 17 00:00:00 2001 From: "Java.Edge" Date: Tue, 14 Apr 2020 16:53:49 +0800 Subject: [PATCH 1/3] EPORT-27996 bugfix --- .../java/com/fr/design/gui/ilist/TableViewList.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java index 06a4f5480..cccf64e26 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java @@ -91,10 +91,10 @@ public class TableViewList extends UIList { if (refreshList != null) { refreshList.cancel(true); } - refreshList = new SwingWorker() { + refreshList = new SwingWorker() { @Override - protected Void doInBackground() throws Exception { + protected DefaultListModel doInBackground() throws Exception { Connection datasource = ConnectionConfig.getInstance().getConnection(databaseName); boolean status = false; int count = 3; @@ -106,13 +106,13 @@ public class TableViewList extends UIList { if (!status) { throw new Exception(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed")); } - TableViewList.this.setModel(processDataInAnotherThread(databaseName, searchFilter, typesFilter)); - return null; + return processDataInAnotherThread(databaseName, searchFilter, typesFilter); } + @Override public void done() { try { - get(); + TableViewList.this.setModel(get()); } catch (Exception e) { if (!(e instanceof InterruptedException) && !(e instanceof CancellationException)) { TableViewList.this.setModel(failed); From 39a4c196878f3d7226a1cdeb63fc9a7659084519 Mon Sep 17 00:00:00 2001 From: vito Date: Tue, 14 Apr 2020 18:10:38 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-29669=20=E5=B1=8F=E8=94=BD=E7=BD=91?= =?UTF-8?q?=E5=9D=80=E7=AE=A1=E7=90=86=E4=B8=AD=E5=BF=83=E5=BC=80=E5=85=B3?= =?UTF-8?q?=E5=9C=A8=E5=85=B3=E9=97=AD=E5=90=8E=E7=9A=84=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/extra/exe/GetPluginCategoriesExecutor.java | 3 ++- .../design/extra/exe/GetPluginFromStoreExecutor.java | 4 ++-- .../com/fr/design/extra/exe/SearchOnlineExecutor.java | 10 +++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java b/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java index 0a3b76211..1d6e8c483 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java +++ b/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java @@ -4,6 +4,7 @@ import com.fr.design.extra.PluginConstants; import com.fr.design.extra.Process; import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; +import com.fr.stable.StringUtils; /** * Created by vito on 16/5/16. @@ -28,7 +29,7 @@ public class GetPluginCategoriesExecutor implements Executor { @Override public void run(Process process) { String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.category"); - if (url != null) { + if (StringUtils.isNotEmpty(url)) { HttpClient httpClient = new HttpClient(url); result = httpClient.getResponseText(); } else { diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java b/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java index 4a1168734..3bf7b2cb3 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java +++ b/designer-base/src/main/java/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java @@ -52,7 +52,7 @@ public class GetPluginFromStoreExecutor implements Executor { @Override public void run(Process process) { - String plistUrl = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.plist") + "?"; + String plistUrl = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.plist"); boolean getRecommend = StringUtils.isEmpty(category) && StringUtils.isEmpty(seller) && StringUtils.isEmpty(fee) && StringUtils.isEmpty(scope); if (getRecommend) { result = PluginOperateUtils.getRecommendPlugins(); @@ -61,7 +61,7 @@ public class GetPluginFromStoreExecutor implements Executor { if (StringUtils.isNotBlank(plistUrl)) { StringBuilder url = new StringBuilder(); - url.append(plistUrl); + url.append(plistUrl).append("?"); PluginOperateUtils.dealParams(url, category, seller, fee, scope); try { HttpClient httpClient = new HttpClient(url.toString()); diff --git a/designer-base/src/main/java/com/fr/design/extra/exe/SearchOnlineExecutor.java b/designer-base/src/main/java/com/fr/design/extra/exe/SearchOnlineExecutor.java index fdbd8562f..1a84519ee 100644 --- a/designer-base/src/main/java/com/fr/design/extra/exe/SearchOnlineExecutor.java +++ b/designer-base/src/main/java/com/fr/design/extra/exe/SearchOnlineExecutor.java @@ -14,8 +14,8 @@ import com.fr.stable.StringUtils; * Created by vito on 16/4/18. */ public class SearchOnlineExecutor implements Executor { - private String result = StringUtils.EMPTY; - private String keyword; + private String result = JSONArray.create().toString(); + private final String keyword; public SearchOnlineExecutor(String keyword) { this.keyword = keyword; @@ -42,7 +42,11 @@ public class SearchOnlineExecutor implements Executor { result = PluginOperateUtils.getRecommendPlugins(); return; } - HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.plugin.store") + "&keyword=" + keyword); + String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.store"); + if (StringUtils.isEmpty(url)) { + return; + } + HttpClient httpClient = new HttpClient(url + "&keyword=" + keyword); httpClient.asGet(); String responseText = httpClient.getResponseText(); JSONObject jsonObject = new JSONObject(responseText); From 78d85bdeeeb75edf0d77ae057b83536c59db4b04 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 14 Apr 2020 18:23:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-29886=20=E4=B8=AD=E6=96=87=E5=86=99?= =?UTF-8?q?=E6=AD=BB=E6=83=85=E5=86=B5=E6=8E=92=E6=9F=A5=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/formula/JavaEditorPane.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java index 9b5a95a43..a34762a1f 100644 --- a/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/JavaEditorPane.java @@ -220,8 +220,8 @@ public class JavaEditorPane extends BasicPane { " }\n" + "\n" + " /**\n" + - " * 获取数据集的列数\n" + - " * @return 数据集的列\n" + + " * Get the number of columns in a dataset\n" + + " * @return Dataset columns\n" + " * @throws TableDataException\n" + " */\n" + " public int getColumnCount() throws TableDataException {\n" + @@ -229,9 +229,9 @@ public class JavaEditorPane extends BasicPane { " }\n" + "\n" + " /**\n" + - " * 获取数据集指定列的列名\n" + - " * @param columnIndex 指定列的索引\n" + - " * @return 指定列的列名\n" + + " * Get the column name of the specified column of the dataset\n" + + " * @param columnIndex The index of the specified column\n" + + " * @return The column name of the specified column\n" + " * @throws TableDataException\n" + " */\n" + " public String getColumnName(int columnIndex) throws TableDataException {\n" + @@ -239,8 +239,8 @@ public class JavaEditorPane extends BasicPane { " }\n" + "\n" + " /**\n" + - " * 获取数据集的行数\n" + - " * @return 数据集数据行数\n" + + " * Get the number of rows in the dataset\n" + + " * @return Dataset rows\n" + " * @throws TableDataException\n" + " */\n" + " public int getRowCount() throws TableDataException {\n" + @@ -248,10 +248,10 @@ public class JavaEditorPane extends BasicPane { " }\n" + "\n" + " /**\n" + - " * 获取数据集指定位置上的值\n" + - " * @param rowIndex 指定的行索引\n" + - " * @param columnIndex 指定的列索引\n" + - " * @return 指定位置的值\n" + + " * Get the value at the specified position in the dataset\n" + + " * @param rowIndex The specified row index\n" + + " * @param columnIndex The specified column index\n" + + " * @return The value of the specified location\n" + " */\n" + " public Object getValueAt(int rowIndex, int columnIndex) {\n" + " return null;\n" + @@ -263,12 +263,12 @@ public class JavaEditorPane extends BasicPane { "import com.fr.script.AbstractFunction;\n" + "\n" + "/**\n" + - " * 自定义函数\n" + + " * Custom function\n" + " */\n" + "public class CustomFun extends AbstractFunction {\n" + " /**\n" + - " * @param args 函数的参数,是经过了算子处理了其中特殊参数的\n" + - " * @return 经过函数处理的值,用于参与最终计算\n" + + " * @param args The parameters of the function are processed by calculator with special parameters\n" + + " * @return The value processed by the function is used to participate in the final calculation\n" + " */\n" + " public Object run(Object[] args) {\n" + " return null;\n" +