From dd3b2680b8c84a38ed0499e5651753b2613e13a4 Mon Sep 17 00:00:00 2001 From: pengda Date: Thu, 10 Jun 2021 14:12:15 +0800 Subject: [PATCH 1/5] =?UTF-8?q?REPORT-53651=20&=20REPORT-53591=20&=20REPOR?= =?UTF-8?q?T-53610=20=E6=8F=92=E4=BB=B6=E6=A3=80=E6=B5=8B=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E5=B1=95=E7=A4=BA=E5=92=8C=E9=87=8D=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../update/actions/SyncFileProcess.java | 24 +++-- .../versioncheck/VersionCheckUtils.java | 26 +++--- .../java/com/fr/env/CheckServiceDialog.java | 90 +++++++++---------- .../com/fr/env/SyncFailedPluginsDialog.java | 26 +++++- 4 files changed, 96 insertions(+), 70 deletions(-) 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 b4a1b49071..304cae1ba1 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 @@ -5,6 +5,7 @@ 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.env.SyncFailedPluginsDialog; import com.fr.json.JSONArray; import com.fr.log.FineLoggerFactory; import java.util.concurrent.ExecutionException; @@ -14,11 +15,12 @@ import javax.swing.SwingWorker; public abstract class SyncFileProcess extends SwingWorker { private String buildNo; private JProgressBar bar; - private JSONArray syncFailedPlugins; + private SyncFailedPluginsDialog syncFailedPluginsDialog; - public SyncFileProcess(JProgressBar bar, String buildNo) { + public SyncFileProcess(JProgressBar bar, String buildNo, SyncFailedPluginsDialog syncFailedPluginsDialog) { this.bar = bar; this.buildNo = buildNo; + this.syncFailedPluginsDialog = syncFailedPluginsDialog; } @Override @@ -26,8 +28,19 @@ public abstract class SyncFileProcess extends SwingWorker { UpdateCallBack callBack = new UpdateProgressCallBack(bar); bar.setValue(0); bar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); - syncFailedPlugins = VersionCheckUtils.syncPlugins(VersionCheckUtils.checkLocalAndRemotePlugin()); - return SyncExecutor.getInstance().execute(callBack, buildNo); + JSONArray syncFailedPlugins = VersionCheckUtils.syncPlugins(VersionCheckUtils.checkLocalAndRemotePlugin()); + if (syncFailedPlugins.size() > 0) { + syncFailedPluginsDialog.showSyncFailedPluginsInfo(syncFailedPlugins); + } + RecoverForDesigner recoverForDesigner = new RecoverForDesigner(); + if (!recoverForDesigner.backup()) { + return false; + } + boolean result = SyncExecutor.getInstance().execute(callBack, buildNo); + if (!result) { + recoverForDesigner.recover(); + } + return result; } @Override @@ -48,9 +61,6 @@ public abstract class SyncFileProcess extends SwingWorker { } } - public JSONArray getSyncFailedPlugins(){ - return syncFailedPlugins; - } /** * 下载成功 diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index 46622c44d8..bd1452e0bc 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -2,13 +2,11 @@ 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; @@ -24,6 +22,7 @@ import com.fr.plugin.manage.control.PluginControllerHelper; import com.fr.plugin.manage.control.PluginTaskCallback; import com.fr.plugin.manage.control.PluginTaskResult; import com.fr.plugin.manage.control.ProgressCallback; +import com.fr.report.ReportHelper; import com.fr.rpc.Result; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; @@ -33,9 +32,6 @@ 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; @@ -206,10 +202,7 @@ public class VersionCheckUtils { } private static boolean needCheckBranch(DesignerWorkspaceInfo selectedEnv) { - if (selectedEnv.getType() == DesignerWorkspaceType.Remote) { - return true; - } - return false; + return selectedEnv.getType() == DesignerWorkspaceType.Remote; } public static JSONArray checkLocalAndRemotePlugin() { @@ -221,21 +214,26 @@ public class VersionCheckUtils { localPluginsMap.put(pluginContext.getID(), pluginContext); } JSONObject remotePlugin; + Map pluginsNameMap = ReportHelper.getPluginNameMap(); for (int i = 0; i < remotePlugins.size(); i++) { remotePlugin = remotePlugins.getJSONObject(i); - if (localPluginsMap.containsKey(remotePlugin.getString(ID))) { - if (ComparatorUtils.equals(localPluginsMap.get(remotePlugin.getString(ID)).getVersion(), remotePlugin.getString(VERSION))) { + if (ComparatorUtils.equals(remotePlugin.getString("running"), "false")) { + continue; + } + String remotePluginID = remotePlugin.getString(ID); + if (localPluginsMap.containsKey(remotePluginID)) { + if (ComparatorUtils.equals(localPluginsMap.get(remotePluginID).getVersion(), remotePlugin.getString(VERSION))) { continue; } else { if (remotePlugin.getString(NAME) == null) { - remotePlugin.put(NAME, localPluginsMap.get(remotePlugin.getString(ID)).getName()); + remotePlugin.put(NAME, localPluginsMap.get(remotePluginID).getName()); } remotePlugin.put("type", INCONSISTENCY); } } else { remotePlugin.put("type", MISSING); if (remotePlugin.getString(NAME) == null) { - remotePlugin.put(NAME, remotePlugin.getString("id")); + remotePlugin.put(NAME, pluginsNameMap.getOrDefault(remotePluginID, remotePluginID)); } } differentPlugins.put(remotePlugin); @@ -303,7 +301,7 @@ public class VersionCheckUtils { return uninstallFailedID; } - private static JSONArray getPluginsSyncFailed(JSONArray differentPlugins){ + private static JSONArray getPluginsSyncFailed(JSONArray differentPlugins) { JSONArray pluginsNeedSync = JSONArray.create(); List localPlugins = PluginManager.getContexts(); Map localPluginsInfo = new HashMap<>(); 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 222a9a2a57..185268e79c 100644 --- a/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java +++ b/designer-base/src/main/java/com/fr/env/CheckServiceDialog.java @@ -308,32 +308,30 @@ public class CheckServiceDialog extends JDialog implements ActionListener { private MouseListener syncButtonClickListener = new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { + ignoreButton.setEnabled(false); String[] option = {Toolkit.i18nText("Fine-Design_Report_Yes"), Toolkit.i18nText("Fine-Design_Report_No")}; - int a = FineJOptionPane.showOptionDialog(getParent(), Toolkit.i18nText("Fine-Design_Basic_Sync_Info_Information"), - 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包一致的话只更新插件 - progressBar.setVisible(true); - progressBar.setString(Toolkit.i18nText("Fine-Design_Update_Info_Wait_Message")); - syncButton.setEnabled(false); - if (!jarConsistency) { + if (!jarConsistency) { + int a = FineJOptionPane.showOptionDialog(getParent(), Toolkit.i18nText("Fine-Design_Basic_Sync_Info_Information"), + 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) { + progressBar.setVisible(true); + progressBar.setString(Toolkit.i18nText("Fine-Design_Update_Info_Wait_Message")); + syncButton.setEnabled(false); deletePreviousPropertyFile(); final String installLib = StableUtils.pathJoin(StableUtils.getInstallHome(), ProjectConstants.LOGS_NAME, UpdateConstants.INSTALL_LIB); final JFrame frame = DesignerContext.getDesignerFrame(); final RestartHelper helper = new RestartHelper(); FineProcessContext.getParentPipe().fire(FineProcessEngineEvent.DESTROY); - SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(),JSONArray.create()); - new SyncFileProcess(progressBar, remoteBuildNo) { + SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(frame, JSONArray.create()); + new SyncFileProcess(progressBar, remoteBuildNo, syncFailedPluginsDialog) { @Override public void onDownloadSuccess() { deleteForDesignerUpdate(installLib); progressBar.setVisible(false); - JSONArray syncFailedPlugins = getSyncFailedPlugins(); - if (syncFailedPlugins.size() > 0) { - syncFailedPluginsDialog.showSyncFailedPluginsInfo(syncFailedPlugins); - syncFailedPluginsDialog.setVisible(true); + syncFailedPluginsDialog.showDialog(); + if (!syncFailedPluginsDialog.restartClicked()) { + helper.restartForUpdate(frame); } - helper.restartForUpdate(frame); } @Override @@ -345,39 +343,39 @@ public class CheckServiceDialog extends JDialog implements ActionListener { helper.restartForUpdate(frame); } }.execute(); - } else { - //到这边说明主jar是一致的,就只尝试同步插件 - new SwingWorker() { - - @Override - protected JSONArray doInBackground() { - progressBar.setString(Toolkit.i18nText("Fine-Design_Basic_Sync_Plugins")); - progressBar.setValue(0); - return VersionCheckUtils.syncPlugins(differentPlugins); + } + } else { + //到这边说明主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); } - - @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); - } else { - FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), - Toolkit.i18nText("Fine-Design_Basic_Sync_Success"), - Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), - FineJOptionPane.INFORMATION_MESSAGE); - } - close(); + if (syncFailedPlugins != null && syncFailedPlugins.size() > 0) { + SyncFailedPluginsDialog syncFailedPluginsDialog = new SyncFailedPluginsDialog(DesignerContext.getDesignerFrame(), syncFailedPlugins); + syncFailedPluginsDialog.setVisible(true); + } else { + FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), + Toolkit.i18nText("Fine-Design_Basic_Sync_Success"), + Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), + FineJOptionPane.INFORMATION_MESSAGE); } - }.execute(); - } + close(); + } + }.execute(); } } }; 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 0a9faab55a..232225c854 100644 --- a/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java +++ b/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java @@ -10,6 +10,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.mainframe.DesignerContext; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.general.CloudCenter; +import com.fr.general.ComparatorUtils; import com.fr.general.GeneralContext; import com.fr.general.IOUtils; import com.fr.json.JSONArray; @@ -25,6 +26,7 @@ import java.util.Locale; import javax.swing.BorderFactory; import javax.swing.Icon; import javax.swing.JDialog; +import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; @@ -39,7 +41,11 @@ public class SyncFailedPluginsDialog extends JDialog { private UILabel detailsLabel; private JScrollPane scrollPane; private UITextArea detailsTextArea; - public SyncFailedPluginsDialog(Frame parent, JSONArray syncFailedPlugins) { + private JFrame frame = DesignerContext.getDesignerFrame(); + private RestartHelper restartHelper = new RestartHelper(); + private UIButton restartButton; + private boolean show; + public SyncFailedPluginsDialog(JFrame parent, JSONArray syncFailedPlugins) { super(parent, true); JPanel body = FRGUIPaneFactory.createBorderLayout_L_Pane(); @@ -79,7 +85,7 @@ public class SyncFailedPluginsDialog extends JDialog { centerPanel.add(scrollPane,BorderLayout.CENTER); JPanel southPane = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); - UIButton restartButton = new UIButton(Toolkit.i18nText("Fine-Design_Updater_Restart_Designer")); + restartButton = new UIButton(Toolkit.i18nText("Fine-Design_Updater_Restart_Designer")); restartButton.addMouseListener(restartButtonClickListener); southPane.add(restartButton); @@ -104,6 +110,15 @@ 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()); + if(!ComparatorUtils.equals(detailsLabel.getText(),StringUtils.EMPTY)){ + show = true; + } + } + + public void showDialog(){ + if(show){ + this.setVisible(true); + } } private MouseListener detailsLabelClickListener = new MouseAdapter() { @@ -119,10 +134,15 @@ public class SyncFailedPluginsDialog extends JDialog { } }; + public boolean restartClicked(){ + return !restartButton.isEnabled(); + } + private MouseListener restartButtonClickListener = new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - RestartHelper.restartForUpdate(DesignerContext.getDesignerFrame()); + restartButton.setEnabled(false); + restartHelper.restartForUpdate(frame); } }; } From c146dc9d369cf520144be05a9e39894184076a75 Mon Sep 17 00:00:00 2001 From: pengda Date: Thu, 10 Jun 2021 14:13:30 +0800 Subject: [PATCH 2/5] =?UTF-8?q?REPORT-53651=20&=20REPORT-53591=20&=20REPOR?= =?UTF-8?q?T-53610=20=E6=8F=92=E4=BB=B6=E6=A3=80=E6=B5=8B=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E5=B1=95=E7=A4=BA=E5=92=8C=E9=87=8D=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/versioncheck/VersionCheckUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index bd1452e0bc..9fa6980e9d 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -331,7 +331,9 @@ public class VersionCheckUtils { @Override public void done(PluginTaskResult result) { latch.countDown(); - FineLoggerFactory.getLogger().info("installPlugin: " + result.getCurrentTask().getMarker().getPluginID()); + if(result.isSuccess()) { + FineLoggerFactory.getLogger().info("installPlugin: " + result.getCurrentTask().getMarker().getPluginID()); + } } }); } From 814b4636f532418f308bd4a3cd35f89e2499f18d Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 10 Jun 2021 16:17:59 +0800 Subject: [PATCH 3/5] =?UTF-8?q?REPORT-53772=20=E3=80=90=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E8=81=94=E5=8A=A8=E3=80=91=E7=BB=84=E4=BB=B6=E5=90=8D/?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=90=8D=E6=9B=BF=E6=8D=A2=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=8B=96=E5=85=A5=E5=A4=B1=E8=B4=A5=E6=97=B6=E9=87=8D?= =?UTF-8?q?=E6=96=B0=E5=86=8D=E6=8B=96=E5=85=A5=E6=88=90=E5=8A=9F=20?= =?UTF-8?q?=E6=9C=89=E5=87=A0=E7=8E=87=E9=80=A0=E6=88=90=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/mod/ContentReplacerCenter.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mod/ContentReplacerCenter.java b/designer-base/src/main/java/com/fr/design/mod/ContentReplacerCenter.java index 7440895a8b..91f9bf3dc7 100644 --- a/designer-base/src/main/java/com/fr/design/mod/ContentReplacerCenter.java +++ b/designer-base/src/main/java/com/fr/design/mod/ContentReplacerCenter.java @@ -30,6 +30,7 @@ import com.fr.event.Listener; import com.fr.log.FineLoggerFactory; import java.util.ArrayList; import java.util.Collection; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -51,7 +52,7 @@ public class ContentReplacerCenter { } private List contentChangeList = new ArrayList<>(); - private List items = new ArrayList<>(); + private Map itemsMap = new HashMap<>(); private ContentReplacerCenter() { @@ -61,21 +62,21 @@ public class ContentReplacerCenter { if (param.getChangeMap().isEmpty()) { return; } - items.add(param); + itemsMap.put(param.getChangeItem(), param); } }); EventDispatcher.listen(TableDataModifyEvent.INSTANCE, new Listener() { @Override public void on(Event event, ContentChangeItem param) { - items.add(param); + itemsMap.put(param.getChangeItem(), param); long start = System.currentTimeMillis(); ContentObjectManager.getInstance().searchObject(param.getObject()); FineLoggerFactory.getLogger().debug("search object spend {} ms", (System.currentTimeMillis() - start)); FineLoggerFactory.getLogger().debug("search result: {}", ContentObjectManager.getInstance().getObjectMap() == null ? null : ContentObjectManager.getInstance().getObjectMap().keySet()); - List itemsCopy = new ArrayList<>(items); - items.clear(); + List itemsCopy = new ArrayList<>(itemsMap.values()); + itemsMap.clear(); onRename(itemsCopy, contentChangeList); } }); From fc96c6bb7129d35a46186a2e9e1c9da3e4c8b185 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Thu, 10 Jun 2021 19:41:26 +0800 Subject: [PATCH 4/5] =?UTF-8?q?REPORT-53785=20=E5=88=87=E6=8D=A2=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E7=9B=AE=E5=BD=95=E5=90=8E=E6=9B=B4=E6=96=B0=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E7=BB=84=E4=BB=B6=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/share/SharableManager.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/designer-realize/src/main/java/com/fr/design/share/SharableManager.java b/designer-realize/src/main/java/com/fr/design/share/SharableManager.java index 05f893fadd..0e3a1c41e8 100644 --- a/designer-realize/src/main/java/com/fr/design/share/SharableManager.java +++ b/designer-realize/src/main/java/com/fr/design/share/SharableManager.java @@ -9,15 +9,21 @@ import com.fr.design.mainframe.share.collect.ComponentCollector; import com.fr.design.mainframe.share.collect.SharableCollectorManager; import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptSelectionClipboardHandler; import com.fr.design.mainframe.share.encrypt.clipboard.impl.EncryptTransferableClipboardHandler; +import com.fr.design.mainframe.share.ui.block.LocalWidgetBlock; +import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane; import com.fr.design.mainframe.share.util.ShareComponentUtils; import com.fr.design.share.utils.EffectItemUtils; +import com.fr.form.share.ShareLoader; +import com.fr.general.GeneralContext; import com.fr.json.JSONArray; +import com.fr.stable.EnvChangedListener; import java.util.List; public class SharableManager { public static void start() { SharableCollectorManager.getInstance().execute(); + listenEnv(); ClipboardFilter.registerClipboardHandler(EncryptSelectionClipboardHandler.getInstance()); ClipboardFilter.registerClipboardHandler(EncryptTransferableClipboardHandler.getInstance()); } @@ -44,4 +50,13 @@ public class SharableManager { } } } + + private static void listenEnv() { + GeneralContext.addEnvChangedListenerToLast(new EnvChangedListener() { + @Override + public void envChanged() { + LocalWidgetRepoPane.getInstance().refreshPane(); + } + }); + } } From a867ed903a02be93b411d6f1fcc6868101a94ec7 Mon Sep 17 00:00:00 2001 From: pengda Date: Thu, 10 Jun 2021 21:07:56 +0800 Subject: [PATCH 5/5] =?UTF-8?q?REPORT-53591=20=E8=BF=9C=E7=A8=8B=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E6=A3=80=E6=B5=8B=E5=8F=8A=E5=90=8C=E6=AD=A5-?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=90=8D=E7=A7=B0=E6=8F=90=E7=A4=BA=E6=9C=89?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/env/SyncFailedPluginsDialog.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 232225c854..7e053db424 100644 --- a/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java +++ b/designer-base/src/main/java/com/fr/env/SyncFailedPluginsDialog.java @@ -44,7 +44,7 @@ public class SyncFailedPluginsDialog extends JDialog { private JFrame frame = DesignerContext.getDesignerFrame(); private RestartHelper restartHelper = new RestartHelper(); private UIButton restartButton; - private boolean show; + private boolean show = false; public SyncFailedPluginsDialog(JFrame parent, JSONArray syncFailedPlugins) { super(parent, true); JPanel body = FRGUIPaneFactory.createBorderLayout_L_Pane(); @@ -110,7 +110,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()); - if(!ComparatorUtils.equals(detailsLabel.getText(),StringUtils.EMPTY)){ + if(!ComparatorUtils.equals(detailsTextArea.getText(),StringUtils.EMPTY)){ show = true; } }