From 58364c9503b34452927a5603858f99dc2e786186 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Tue, 8 Jun 2021 14:46:24 +0800 Subject: [PATCH 1/6] =?UTF-8?q?REPORT-53592=20=E6=89=A9=E5=B1=95=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E5=88=9B=E5=BB=BA=E5=85=B1=E4=BA=AB=E7=BB=84=E4=BB=B6?= =?UTF-8?q?npe=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/share/effect/EffectItemGroup.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java b/designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java index a07478c9d9..91d842c61e 100644 --- a/designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java +++ b/designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java @@ -111,8 +111,11 @@ public class EffectItemGroup { ChartCollection chartCollection = (ChartCollection) value; for (int index = 0; index < chartCollection.getChartCount(); index++) { Chart chart= (Chart) chartCollection.getChart(index, ChartProvider.class); - SourceNode chartSourceNode = SourceNodeUtils.createSourceNode(chart.getPlot(), chartCollection.getChartName(index), cellSourceNode); Plot plot = chart.getPlot(); + if (plot == null) { + break; + } + SourceNode chartSourceNode = SourceNodeUtils.createSourceNode(plot, chartCollection.getChartName(index), cellSourceNode); initChartPlot(plot, chartSourceNode, false); } @@ -126,8 +129,11 @@ public class EffectItemGroup { ChartCollection chartCollection = (ChartCollection) editor.getChartCollection(); for (int index = 0; index < chartCollection.getChartCount(); index++) { Chart chart= (Chart) chartCollection.getChart(index, ChartProvider.class); - SourceNode plotSourceNode = SourceNodeUtils.createSourceNode(chart.getPlot(), chartCollection.getChartName(index), null); Plot plot = chart.getPlot(); + if (plot == null) { + break; + } + SourceNode plotSourceNode = SourceNodeUtils.createSourceNode(plot, chartCollection.getChartName(index), null); initChartPlot(plot, plotSourceNode, false); } From 7edab03d094468cb90ded27c6a86e793f7ad6588 Mon Sep 17 00:00:00 2001 From: pengda Date: Tue, 8 Jun 2021 15:36:53 +0800 Subject: [PATCH 2/6] =?UTF-8?q?REPORT-53601=20&=20REPORT-53614=20=20?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=96=87=E6=9C=AC=E6=A1=86=E6=A1=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=8D=E5=8F=AF=E7=BC=96=E8=BE=91=E3=80=82=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E6=9D=A1=E6=9B=B4=E6=96=B0=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/env/CheckServiceDialog.java | 59 ++++++++++--------- .../com/fr/env/SyncFailedPluginsDialog.java | 1 + 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java index 3a46126992..062b20acdc 100644 --- a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java +++ b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java @@ -40,7 +40,6 @@ import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.io.File; import java.util.List; -import java.util.concurrent.ExecutionException; import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JDialog; @@ -155,7 +154,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener { detailsComponents = new Component[][]{{jarCheckTitleLabel}, {jarCheckResultLabel}, {affectedFunctionsLabel}, {affectedFunctionsDetailsPane}, {pluginCheckTitleLabel}, {pluginsCheckResultPanel}}; hideAffectedFunctionsComponents = new Component[][]{{jarCheckTitleLabel}, {jarCheckResultLabel}, {affectedFunctionsLabel}, {pluginCheckTitleLabel}, {pluginsCheckResultPanel}}; if (noExistServiceDescription.size() > 0 && !ComparatorUtils.equals(remoteBranch, localBranch)) { - detailsRowSize = new double[]{p, p, p, p,p,p}; + detailsRowSize = new double[]{p, p, p, p, p, p}; detailsInnerPane = TableLayoutHelper.createTableLayoutPane(detailsComponents, detailsRowSize, detailsColumnSize); } else { detailsRowSize = new double[]{p, p, 0, 0, p, p}; @@ -330,32 +329,36 @@ public class CheckServiceDialog extends JDialog implements ActionListener { @Override public void onDownloadSuccess() { deleteForDesignerUpdate(installLib); - //主jar下载成功之后再卸载安装插件 - progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); - progressBar.setValue(0); - new SwingWorker() { - - @Override - protected JSONArray doInBackground() { - return VersionCheckUtils.syncPlugins(differentPlugins); - } - - @Override - protected void done() { - progressBar.setVisible(false); - JSONArray syncFailedPlugins = null; - try { - syncFailedPlugins = get(); - } catch (Exception ex) { - FineLoggerFactory.getLogger().error(ex.getMessage(), ex); + if (differentPlugins.size() > 0) { + //主jar下载成功之后再卸载安装插件 + new SwingWorker() { + + @Override + protected JSONArray doInBackground() { + progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); + progressBar.setValue(0); + return VersionCheckUtils.syncPlugins(differentPlugins); } - if (syncFailedPlugins != null && syncFailedPlugins.size() > 0) { - SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(), syncFailedPlugins); - syncFailedPluginsDialog.setVisible(true); + + @Override + protected void done() { + progressBar.setVisible(false); + JSONArray syncFailedPlugins = null; + try { + syncFailedPlugins = get(); + } catch (Exception ex) { + FineLoggerFactory.getLogger().error(ex.getMessage(), ex); + } + if (syncFailedPlugins != null && syncFailedPlugins.size() > 0) { + SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(), syncFailedPlugins); + syncFailedPluginsDialog.setVisible(true); + } + helper.restartForUpdate(frame); } - helper.restartForUpdate(frame); - } - }.execute(); + }.execute(); + } else { + helper.restartForUpdate(frame); + } } @Override @@ -369,12 +372,12 @@ public class CheckServiceDialog extends JDialog implements ActionListener { }.execute(); } else { //到这边说明主jar是一致的,就只尝试同步插件 - progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); - progressBar.setValue(0); new SwingWorker() { @Override protected JSONArray doInBackground() { + progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); + progressBar.setValue(0); return VersionCheckUtils.syncPlugins(differentPlugins); } diff --git a/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java b/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java index b9046e1535..9bf63460da 100644 --- a/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java +++ b/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java @@ -77,6 +77,7 @@ public class SyncFailedPluginsDialog extends JDialog { detailsText.append(plugin.getString("name")).append(",").append(Toolkit.i18nText("Fine-Design_Basic_Sync_Server_Version")).append(plugin.getString("version")).append("\n"); } detailsTextArea.setText(detailsText.toString()); + detailsTextArea.setEditable(false); scrollPane = new JScrollPane(detailsTextArea); centerPanel.add(detailsTitlePanel,BorderLayout.NORTH); centerPanel.add(scrollPane,BorderLayout.CENTER); From ed8b36a8ad5c15234bef9a3cc8d307d6f87bed89 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Tue, 8 Jun 2021 19:06:47 +0800 Subject: [PATCH 3/6] =?UTF-8?q?REPORT-52539=20window=E4=B8=8A=E7=94=9F?= =?UTF-8?q?=E6=88=90=E9=9D=A2=E6=9D=BF=E5=87=BA=E7=8E=B0=E4=BA=86=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/share/ui/generate/EffectContent.java | 4 ++-- .../com/fr/design/share/ui/generate/ShareGeneratePane.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/share/ui/generate/EffectContent.java b/designer-realize/src/main/java/com/fr/design/share/ui/generate/EffectContent.java index 4fef5f51a4..0eeda7731c 100644 --- a/designer-realize/src/main/java/com/fr/design/share/ui/generate/EffectContent.java +++ b/designer-realize/src/main/java/com/fr/design/share/ui/generate/EffectContent.java @@ -56,8 +56,8 @@ public class EffectContent extends JPanel { Object[] columnNames = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Share_From"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Share_Rename")}; JTable table = new JTable(new EffectTableModel(effectItemGroup, columnNames)); table.setRowHeight(25); - table.getColumnModel().getColumn(0).setPreferredWidth(235); - table.getColumnModel().getColumn(1).setPreferredWidth(325); + table.getColumnModel().getColumn(0).setPreferredWidth(230); + table.getColumnModel().getColumn(1).setPreferredWidth(320); table.setDefaultEditor(EffectTableModel.class, new EffectItemEditor(table)); diff --git a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareGeneratePane.java b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareGeneratePane.java index 82eb60f08a..3ba8bb8e6c 100644 --- a/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareGeneratePane.java +++ b/designer-realize/src/main/java/com/fr/design/share/ui/generate/ShareGeneratePane.java @@ -56,7 +56,7 @@ import static javax.swing.JOptionPane.ERROR_MESSAGE; **/ public class ShareGeneratePane extends BasicPane { - private static final Dimension DIALOG_SIZE = new Dimension(670, 740); + private static final Dimension DIALOG_SIZE = new Dimension(670, 760); private static final Dimension DIALOG_NORMAL_SIZE = new Dimension(670, 610); private static final Border DIALOG_BORDER = BorderFactory.createEmptyBorder(0, 6, 4, 6); From 3af622275391f496956161d41650569a460a6299 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Wed, 9 Jun 2021 09:23:02 +0800 Subject: [PATCH 4/6] =?UTF-8?q?REPORT-53592=20=E6=89=A9=E5=B1=95=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E5=88=9B=E5=BB=BA=E5=85=B1=E4=BA=AB=E7=BB=84=E4=BB=B6?= =?UTF-8?q?npe=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/share/effect/EffectItemGroup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java b/designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java index 91d842c61e..c04932d0d7 100644 --- a/designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java +++ b/designer-realize/src/main/java/com/fr/design/share/effect/EffectItemGroup.java @@ -113,7 +113,7 @@ public class EffectItemGroup { Chart chart= (Chart) chartCollection.getChart(index, ChartProvider.class); Plot plot = chart.getPlot(); if (plot == null) { - break; + continue; } SourceNode chartSourceNode = SourceNodeUtils.createSourceNode(plot, chartCollection.getChartName(index), cellSourceNode); initChartPlot(plot, chartSourceNode, false); @@ -131,7 +131,7 @@ public class EffectItemGroup { Chart chart= (Chart) chartCollection.getChart(index, ChartProvider.class); Plot plot = chart.getPlot(); if (plot == null) { - break; + continue; } SourceNode plotSourceNode = SourceNodeUtils.createSourceNode(plot, chartCollection.getChartName(index), null); initChartPlot(plot, plotSourceNode, false); From b351e0129862cb9cb034958906ffcf721c78c9a3 Mon Sep 17 00:00:00 2001 From: pengda Date: Wed, 9 Jun 2021 11:45:02 +0800 Subject: [PATCH 5/6] =?UTF-8?q?REPORT-53601=20&=20REPORT-53614=20=20?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=96=87=E6=9C=AC=E6=A1=86=E6=A1=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=8D=E5=8F=AF=E7=BC=96=E8=BE=91=E3=80=82=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E6=9D=A1=E6=9B=B4=E6=96=B0=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/EnvChangeEntrance.java | 3 +- .../update/actions/SyncFileProcess.java | 19 ++++++-- .../{ => versioncheck}/VersionCheckUtils.java | 23 ++++++---- .../java/com/fr/env/CheckServiceDialog.java | 45 +++++-------------- .../com/fr/env/VersionCheckMessageDialog.java | 2 +- .../module/DesignerWorkspaceProvider.java | 2 +- 6 files changed, 43 insertions(+), 51 deletions(-) rename designer-base/src/main/java/com/fr/design/{ => versioncheck}/VersionCheckUtils.java (94%) diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index c5a4a7dd2e..4ab6b30896 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -18,11 +18,10 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JTemplate; import com.fr.design.utils.DesignUtils; -import com.fr.env.CheckServiceDialog; +import com.fr.design.versioncheck.VersionCheckUtils; import com.fr.env.EnvListPane; import com.fr.env.RemoteWorkspaceURL; import com.fr.env.TestConnectionResult; -import com.fr.env.VersionCheckMessageDialog; import com.fr.exit.DesignerExiter; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralUtils; diff --git a/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java b/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java index 1614d1084c..b41d099cbb 100644 --- a/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java +++ b/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java @@ -2,22 +2,33 @@ package com.fr.design.update.actions; import com.fr.decision.update.SyncExecutor; import com.fr.decision.update.info.UpdateCallBack; +import com.fr.decision.update.info.UpdateProgressCallBack; +import com.fr.design.i18n.Toolkit; +import com.fr.design.versioncheck.VersionCheckUtils; import com.fr.log.FineLoggerFactory; import java.util.concurrent.ExecutionException; +import javax.swing.JProgressBar; import javax.swing.SwingWorker; public abstract class SyncFileProcess extends SwingWorker { - private UpdateCallBack callBack; private String buildNo; + private JProgressBar bar; - public SyncFileProcess(UpdateCallBack callBack,String buildNo) { - this.callBack = callBack; + public SyncFileProcess(JProgressBar bar, String buildNo) { + this.bar = bar; this.buildNo = buildNo; } @Override protected Boolean doInBackground() throws Exception { - return SyncExecutor.getInstance().execute(callBack,buildNo); + UpdateCallBack callBack = new UpdateProgressCallBack(bar); + boolean result = SyncExecutor.getInstance().execute(callBack, buildNo); + if (result) { + bar.setValue(0); + bar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); + VersionCheckUtils.syncPlugins(VersionCheckUtils.checkLocalAndRemotePlugin()); + } + return SyncExecutor.getInstance().execute(callBack, buildNo); } @Override diff --git a/designer-base/src/main/java/com/fr/design/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java similarity index 94% rename from designer-base/src/main/java/com/fr/design/VersionCheckUtils.java rename to designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index 17dcd51a13..11780409a7 100644 --- a/designer-base/src/main/java/com/fr/design/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -1,11 +1,14 @@ -package com.fr.design; +package com.fr.design.versioncheck; import com.fr.base.FRContext; +import com.fr.design.DesignerEnvManager; +import com.fr.design.dialog.NotificationDialog; import com.fr.design.env.DesignerWorkspaceInfo; import com.fr.design.env.DesignerWorkspaceType; import com.fr.design.env.RemoteWorkspace; import com.fr.design.i18n.Toolkit; import com.fr.design.mainframe.DesignerContext; +import com.fr.env.CheckServiceDialog; import com.fr.env.VersionCheckMessageDialog; import com.fr.general.ComparatorUtils; import com.fr.general.GeneralUtils; @@ -30,6 +33,9 @@ import com.fr.workspace.engine.base.FineObjectPool; import com.fr.workspace.engine.channel.http.FunctionalHttpRequest; import com.fr.workspace.engine.exception.WorkspaceConnectionException; import com.fr.workspace.engine.rpc.WorkspaceProxyPool; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; import java.lang.reflect.Method; import java.text.ParsePosition; import java.text.SimpleDateFormat; @@ -226,21 +232,21 @@ public class VersionCheckUtils { } remotePlugin.put("type", INCONSISTENCY); } - } - remotePlugin.put("type", MISSING); - if (remotePlugin.getString(NAME) == null) { - remotePlugin.put(NAME, remotePlugin.getString("id")); + } else { + remotePlugin.put("type", MISSING); + if (remotePlugin.getString(NAME) == null) { + remotePlugin.put(NAME, remotePlugin.getString("id")); + } } differentPlugins.put(remotePlugin); } return differentPlugins; } - public static JSONArray syncPlugins(JSONArray differentPlugins) { + public static void syncPlugins(JSONArray differentPlugins) { Set uninstallFailed = uninstallPlugins(differentPlugins); List plugins = getSyncPlugins(differentPlugins, uninstallFailed); installPlugins(plugins); - return getPluginsSyncFailed(differentPlugins); } private static List getSyncPlugins(JSONArray differentPlugins, Set uninstallFailed) { @@ -296,7 +302,7 @@ public class VersionCheckUtils { return uninstallFailedID; } - private static JSONArray getPluginsSyncFailed(JSONArray differentPlugins){ + public static JSONArray getPluginsSyncFailed(JSONArray differentPlugins){ JSONArray pluginsNeedSync = JSONArray.create(); List localPlugins = PluginManager.getContexts(); Map localPluginsInfo = new HashMap<>(); @@ -326,6 +332,7 @@ public class VersionCheckUtils { @Override public void done(PluginTaskResult result) { latch.countDown(); + FineLoggerFactory.getLogger().info("installPlugin: " + result.getCurrentTask().getMarker().getPluginID()); } }); } diff --git a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java index 062b20acdc..7e9e74ebcf 100644 --- a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java +++ b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java @@ -1,10 +1,7 @@ package com.fr.env; import com.fr.decision.update.data.UpdateConstants; -import com.fr.decision.update.info.UpdateCallBack; -import com.fr.decision.update.info.UpdateProgressCallBack; import com.fr.design.RestartHelper; -import com.fr.design.VersionCheckUtils; import com.fr.design.dialog.FineJOptionPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; @@ -15,6 +12,7 @@ import com.fr.design.layout.TableLayoutHelper; import com.fr.design.mainframe.DesignerContext; import com.fr.design.update.actions.SyncFileProcess; import com.fr.design.utils.gui.GUICoreUtils; +import com.fr.design.versioncheck.VersionCheckUtils; import com.fr.general.CloudCenter; import com.fr.general.CloudCenterConfig; import com.fr.general.ComparatorUtils; @@ -315,7 +313,6 @@ public class CheckServiceDialog extends JDialog implements ActionListener { Toolkit.i18nText("Fine-Design_Basic_Confirm"), JOptionPane.YES_NO_OPTION, QUESTION_MESSAGE, IOUtils.readIcon("com/fr/design/icon/versioncheck/question.png"), option, 1); if (0 == a) { //jar包一致的话只更新插件 - UpdateCallBack callBack = new UpdateProgressCallBack(progressBar); progressBar.setVisible(true); progressBar.setString(Toolkit.i18nText("Fine-Design_Update_Info_Wait_Message")); syncButton.setEnabled(false); @@ -325,40 +322,17 @@ public class CheckServiceDialog extends JDialog implements ActionListener { final JFrame frame = DesignerContext.getDesignerFrame(); final RestartHelper helper = new RestartHelper(); FineProcessContext.getParentPipe().fire(FineProcessEngineEvent.DESTROY); - new SyncFileProcess(callBack, remoteBuildNo) { + new SyncFileProcess(progressBar, remoteBuildNo) { @Override public void onDownloadSuccess() { deleteForDesignerUpdate(installLib); - if (differentPlugins.size() > 0) { - //主jar下载成功之后再卸载安装插件 - new SwingWorker() { - - @Override - protected JSONArray doInBackground() { - progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); - progressBar.setValue(0); - return VersionCheckUtils.syncPlugins(differentPlugins); - } - - @Override - protected void done() { - progressBar.setVisible(false); - JSONArray syncFailedPlugins = null; - try { - syncFailedPlugins = get(); - } catch (Exception ex) { - FineLoggerFactory.getLogger().error(ex.getMessage(), ex); - } - if (syncFailedPlugins != null && syncFailedPlugins.size() > 0) { - SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(), syncFailedPlugins); - syncFailedPluginsDialog.setVisible(true); - } - helper.restartForUpdate(frame); - } - }.execute(); - } else { - helper.restartForUpdate(frame); + progressBar.setVisible(false); + JSONArray syncFailedPlugins = VersionCheckUtils.getPluginsSyncFailed(differentPlugins); + if (syncFailedPlugins.size() > 0) { + SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(), syncFailedPlugins); + syncFailedPluginsDialog.setVisible(true); } + helper.restartForUpdate(frame); } @Override @@ -378,7 +352,8 @@ public class CheckServiceDialog extends JDialog implements ActionListener { protected JSONArray doInBackground() { progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); progressBar.setValue(0); - return VersionCheckUtils.syncPlugins(differentPlugins); + VersionCheckUtils.syncPlugins(differentPlugins); + return VersionCheckUtils.getPluginsSyncFailed(differentPlugins); } @Override diff --git a/designer-base/src/main/java/com/fr/env/VersionCheckMessageDialog.java b/designer-base/src/main/java/com/fr/env/VersionCheckMessageDialog.java index 657b13e0a3..5fd4c9ec09 100644 --- a/designer-base/src/main/java/com/fr/env/VersionCheckMessageDialog.java +++ b/designer-base/src/main/java/com/fr/env/VersionCheckMessageDialog.java @@ -1,6 +1,6 @@ package com.fr.env; -import com.fr.design.VersionCheckUtils; +import com.fr.design.versioncheck.VersionCheckUtils; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java index 4c759822bd..220a4e39e2 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java @@ -2,7 +2,6 @@ package com.fr.start.module; import com.fr.design.DesignerEnvManager; import com.fr.design.EnvChangeEntrance; -import com.fr.design.VersionCheckUtils; import com.fr.design.constants.DesignerLaunchStatus; import com.fr.design.editlock.ConnectionLockChangeChecker; import com.fr.design.editlock.ServerTableDataLockChangeChecker; @@ -10,6 +9,7 @@ import com.fr.design.env.DesignerWorkspaceGenerator; import com.fr.design.env.DesignerWorkspaceInfo; import com.fr.design.env.LocalDesignerWorkspaceInfo; import com.fr.design.i18n.Toolkit; +import com.fr.design.versioncheck.VersionCheckUtils; import com.fr.env.TestConnectionResult; import com.fr.event.Event; import com.fr.event.EventDispatcher; From c2b91aabf45f08aba95e9f324f6f90a24f0c2238 Mon Sep 17 00:00:00 2001 From: pengda Date: Wed, 9 Jun 2021 11:49:18 +0800 Subject: [PATCH 6/6] =?UTF-8?q?REPORT-53601=20&=20REPORT-53614=20=20?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E6=96=87=E6=9C=AC=E6=A1=86=E6=A1=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=8D=E5=8F=AF=E7=BC=96=E8=BE=91=E3=80=82=E8=BF=9B?= =?UTF-8?q?=E5=BA=A6=E6=9D=A1=E6=9B=B4=E6=96=B0=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/update/actions/SyncFileProcess.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java b/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java index b41d099cbb..ea2db13989 100644 --- a/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java +++ b/designer-base/src/main/java/com/fr/design/update/actions/SyncFileProcess.java @@ -28,7 +28,7 @@ public abstract class SyncFileProcess extends SwingWorker { bar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); VersionCheckUtils.syncPlugins(VersionCheckUtils.checkLocalAndRemotePlugin()); } - return SyncExecutor.getInstance().execute(callBack, buildNo); + return result; } @Override