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 cd9c835f39..d575c68d01 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -427,7 +427,9 @@ public class EnvChangeEntrance { DesignerExiter.getInstance().execute(); } else { updateNotRememberPwdEnv(); - VersionCheckUtils.showVersionCheckDialog(envListPane.getSelectedName()); + if (DesignerContext.getDesignerFrame().isVisible()) { + VersionCheckUtils.showVersionCheckDialog(envListPane.getSelectedName()); + } } } diff --git a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java index 1dd08c5266..3d36e563cc 100644 --- a/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java +++ b/designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java @@ -1,5 +1,6 @@ package com.fr.design.actions.help.alphafine; +import com.fr.base.FRContext; import com.fr.design.DesignerEnvManager; import com.fr.general.ComparatorUtils; import com.fr.license.function.VT4FR; @@ -442,7 +443,7 @@ public class AlphaFineConfigManager implements XMLable { } public boolean isProductDynamics() { - return productDynamics; + return productDynamics && FRContext.isChineseEnv(); } public void setProductDynamics(boolean productDynamics) { diff --git a/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java index 91899e5b54..67784159c0 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java @@ -100,8 +100,7 @@ public class NorthRegionContainerPane extends JPanel { //优先级为-1,保证最后全面刷新一次 GeneralContext.listenPluginRunningChanged(pluginOnRunOrStopListener, pluginFilter); // 在设计器启动时仅在最后一个插件启用时候进行刷新一次 如果插件启用过程中存在实现了设计器接口的插件 - boolean needRefresh = DesignerContext.getDesignerFrame() != null && DesignerContext.getDesignerFrame().isVisible() && existDesignExtraPlugin; - if (needRefresh) { + if (existDesignExtraPlugin) { refreshAll(northEastPane, ad); } } 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 d2794cd6e6..d7823aadf5 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 @@ -52,6 +52,7 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; +import javax.swing.SwingWorker; /** * @author pengda @@ -95,9 +96,23 @@ public class VersionCheckUtils { } public static void showVersionCheckDialog(String envName) { - if (!VersionCheckUtils.versionCheck(envName)) { - showNotificationDialog(envName); - } + new SwingWorker() { + @Override + protected Boolean doInBackground() { + return !VersionCheckUtils.versionCheck(envName); + } + + @Override + protected void done() { + try { + if (get()) { + showNotificationDialog(envName); + } + } catch (Exception e) { + FineLoggerFactory.getLogger().warn(e.getMessage(), e); + } + } + }.execute(); } private static void showNotificationDialog(String envName) { @@ -294,7 +309,7 @@ public class VersionCheckUtils { private static boolean isPluginNeedIgnore(JSONObject remotePlugin) { return ComparatorUtils.equals(remotePlugin.getString(RUNNING), "false") || (remotePlugin.containsKey(SYNC) && !remotePlugin.getBoolean(SYNC)) - || (remotePlugin.containsKey(GROUP) && ComparatorUtils.equals(remotePlugin.containsKey(GROUP), BI) || remotePlugin.getString(ID).startsWith(BIPREFIX) + || (remotePlugin.containsKey(GROUP) && ComparatorUtils.equals(remotePlugin.getString(GROUP), BI) || remotePlugin.getString(ID).startsWith(BIPREFIX) || pluginsNeedIgnore.contains(remotePlugin.getString(ID))); } diff --git a/designer-base/src/main/java/com/fr/start/BaseDesigner.java b/designer-base/src/main/java/com/fr/start/BaseDesigner.java index b3945d0d7f..d913f7a799 100644 --- a/designer-base/src/main/java/com/fr/start/BaseDesigner.java +++ b/designer-base/src/main/java/com/fr/start/BaseDesigner.java @@ -16,6 +16,7 @@ import com.fr.design.mainframe.DesignerFrame; import com.fr.design.mainframe.toolbar.ToolBarMenuDock; import com.fr.design.monitor.DesignerLifecycleMonitorContext; import com.fr.design.ui.util.UIUtil; +import com.fr.design.versioncheck.VersionCheckUtils; import com.fr.event.Event; import com.fr.event.EventDispatcher; import com.fr.event.Listener; @@ -84,10 +85,19 @@ public abstract class BaseDesigner extends ToolBarMenuDock { eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue())); } collectUserInformation(); + checkVersion(); } }); } + private void checkVersion() { + try { + VersionCheckUtils.showVersionCheckDialog(DesignerEnvManager.getEnvManager().getCurEnvName()); + } catch (Exception e) { + FineLoggerFactory.getLogger().warn("Check Service Failed"); + } + } + public void show() { UIUtil.invokeLaterIfNeeded(this::refreshTemplateTree); } diff --git a/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java b/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java index a387e0f3a9..1d69726df7 100644 --- a/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java +++ b/designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java @@ -3,7 +3,6 @@ */ package com.fr.poly.creator; -import com.fr.base.BaseUtils; import com.fr.base.ScreenResolution; import com.fr.base.vcs.DesignerMode; import com.fr.design.constants.UIConstants; @@ -11,7 +10,15 @@ import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedListener; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.gui.frpane.HyperlinkGroupPane; -import com.fr.design.mainframe.*; +import com.fr.design.mainframe.CellElementPropertyPane; +import com.fr.design.mainframe.CellWidgetPropertyPane; +import com.fr.design.mainframe.DesignerContext; +import com.fr.design.mainframe.EastRegionContainerPane; +import com.fr.design.mainframe.ElementCasePane; +import com.fr.design.mainframe.HyperlinkGroupPaneActionImpl; +import com.fr.design.mainframe.JTemplate; +import com.fr.design.mainframe.JWorkBook; +import com.fr.design.mainframe.ReportFloatPane; import com.fr.design.mainframe.cell.QuickEditorRegion; import com.fr.design.present.ConditionAttributesGroupPane; import com.fr.grid.GridUtils; @@ -26,8 +33,9 @@ import com.fr.report.poly.PolyECBlock; import com.fr.stable.unit.UNITConstants; import com.fr.stable.unit.UnitRectangle; -import javax.swing.*; -import java.awt.*; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import java.awt.Dimension; /** * @author richer @@ -166,6 +174,7 @@ public class ECBlockEditor extends BlockEditor { // 条件属性 ConditionAttributesGroupPane conditionAttributesGroupPane = ConditionAttributesGroupPane.getInstance(); conditionAttributesGroupPane.populate(editComponent); + EastRegionContainerPane.getInstance().replaceConditionAttrPane(conditionAttributesGroupPane); EastRegionContainerPane.getInstance().updateCellElementState(isSelectedOneCell()); if (chooseBlock) { 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 724f947c94..9c8b2e0f5b 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 @@ -61,18 +61,6 @@ public class DesignerWorkspaceProvider extends Activator { EnvChangeEntrance.getInstance().dealEvnExceptionWhenStartDesigner(null, workspaceInfo); } else { WorkContext.switchTo(workspace); - //在设计器完全启动完成后,对初始环境进行一次服务检测,对主要功能无影响,异常仅做日志提示即可 - final String selectEnv = current; - EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener() { - @Override - public void on(Event event, Null aNull) { - try { - VersionCheckUtils.showVersionCheckDialog(selectEnv); - } catch (Exception e) { - FineLoggerFactory.getLogger().warn("Check Service Failed"); - } - } - }); } } catch (Throwable e) { EnvChangeEntrance.getInstance().dealEvnExceptionWhenStartDesigner(e, workspaceInfo);