diff --git a/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java b/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java index 09e16303a7..7b9dfa7577 100644 --- a/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java +++ b/designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateManager.java @@ -1,5 +1,6 @@ package com.fr.design.update.push; +import com.fr.design.event.DesignerOpenedListener; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerFrame; import com.fr.design.update.ui.dialog.UpdateMainDialog; @@ -23,6 +24,15 @@ public class DesignerPushUpdateManager { private DesignerUpdateInfo updateInfo; private DesignerPushUpdateConfigManager config; + static { + DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() { + @Override + public void designerOpened() { + getInstance().checkAndPop(); + } + }); + } + private DesignerPushUpdateManager() { config = DesignerPushUpdateConfigManager.getInstance(); } diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index ff0bef0643..f360f24b9b 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -21,7 +21,6 @@ import com.fr.design.actions.insert.flot.FormulaFloatAction; import com.fr.design.actions.insert.flot.ImageFloatAction; import com.fr.design.actions.insert.flot.TextBoxFloatAction; import com.fr.design.bridge.DesignToolbarProvider; -import com.fr.design.event.DesignerOpenedListener; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.form.parameter.FormParaDesigner; import com.fr.design.fun.ElementUIProvider; @@ -36,7 +35,6 @@ import com.fr.design.javascript.ParameterJavaScriptPane; import com.fr.design.javascript.ProcessTransitionAdapter; import com.fr.design.mainframe.BaseJForm; import com.fr.design.mainframe.CellElementPropertyPane; -import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerFrameFileDealerPane; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.ElementCaseThumbnail; @@ -55,7 +53,6 @@ import com.fr.design.mainframe.loghandler.DesignerLogAppender; import com.fr.design.mainframe.loghandler.LogMessageBar; import com.fr.design.mainframe.socketio.DesignerSocketIO; import com.fr.design.module.DesignModuleFactory; -import com.fr.design.update.push.DesignerPushUpdateManager; import com.fr.design.parameter.FormParameterReader; import com.fr.design.parameter.ParameterPropertyPane; import com.fr.design.parameter.WorkBookParameterReader; @@ -132,16 +129,6 @@ public class DesignerActivator extends Activator { loadLogAppender(); DesignerSocketIO.update(); UserInfoPane.getInstance().updateBBSUserInfo(); - checkUpdateLater(); - } - - private void checkUpdateLater() { - DesignerContext.getDesignerFrame().addDesignerOpenedListener(new DesignerOpenedListener() { - @Override - public void designerOpened() { - DesignerPushUpdateManager.getInstance().checkAndPop(); - } - }); } private void loadLogAppender() {