From 9163788f7b5434f56e438ab1b32977287c72c646 Mon Sep 17 00:00:00 2001 From: Harrison Date: Tue, 23 Aug 2022 22:22:26 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-78881=E3=80=90=E8=BF=AD=E4=BB=A3?= =?UTF-8?q?=E3=80=91=E3=80=90=E8=B5=B7=E5=A7=8B=E9=A1=B5=E3=80=91=E5=85=88?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E4=B8=80=E4=B8=AA=E4=BC=9A=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E5=B7=A5=E4=BD=9C=E7=9B=AE=E5=BD=95=EF=BC=8C=E5=86=8D?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=9C=AC=E5=9C=B0=E7=9B=AE=E5=BD=95=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=EF=BC=8C=E9=A2=84=E8=A7=88=E6=A8=A1=E6=9D=BF=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=20=E8=AE=A9=E5=86=85=E7=BD=AE=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E6=99=9A=E7=82=B9=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/start/common/DesignerStartupContext.java | 3 ++- .../src/main/java/com/fr/start/module/DesignerStartup.java | 3 ++- .../start/module/optimized/DesignerStartupPageActivator.java | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/start/common/DesignerStartupContext.java b/designer-base/src/main/java/com/fr/start/common/DesignerStartupContext.java index 2c2508dd2e..9c8b986341 100644 --- a/designer-base/src/main/java/com/fr/start/common/DesignerStartupContext.java +++ b/designer-base/src/main/java/com/fr/start/common/DesignerStartupContext.java @@ -22,6 +22,7 @@ public class DesignerStartupContext { /** * 可以启动 + * 当遇到 mac 双击启动时,需要将这里置为 false, 见 {@link FileOpen4MacDeepLink} */ private boolean enabled = true; @@ -127,7 +128,7 @@ public class DesignerStartupContext { DesignerEnvManager envManager = DesignerEnvManager.getEnvManager(); Iterator envNameIterator = envManager.getEnvNameIterator(); ArrayList envs = Lists.newArrayList(envNameIterator); - return !startupArgs.isDemo() && DesignerStartupUtil.convertArgs2FILE(startupArgs.get()) == null && !envs.isEmpty() && envManager.isStartupPageEnabled() && enabled; + return !startupArgs.isDemo() && DesignerStartupUtil.convertArgs2FILE(startupArgs.get()) == null && !envs.isEmpty() && (envs.size() != 1) && envManager.isStartupPageEnabled() && enabled; } /* 预热相关 */ diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java index ff7962f61a..4a4fbac2b0 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java @@ -33,6 +33,7 @@ import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; import com.fr.start.DesignerProcessType; import com.fr.start.ServerStarter; +import com.fr.start.common.DesignerStartupContext; import com.fr.start.event.LazyStartupEvent; import com.fr.start.preload.PreLoadService; import com.fr.start.server.FineEmbedServer; @@ -120,7 +121,7 @@ public class DesignerStartup extends Activator { || FineEmbedServer.isRunning()) { return; } - if (DaoSelectorFactory.getDaoSelector().useCacheDao()) { + if (DaoSelectorFactory.getDaoSelector().useCacheDao() || DesignerStartupContext.getInstance().isOnStartup()) { listenEvent(LazyStartupEvent.INSTANCE, new Listener(Integer.MIN_VALUE) { @Override public void on(Event event, Null param) { diff --git a/designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java b/designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java index 9e590a3e1d..568b512938 100644 --- a/designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java @@ -1,6 +1,7 @@ package com.fr.start.module.optimized; import com.fr.design.DesignerEnvManager; +import com.fr.design.mainframe.DesignerContext; import com.fr.design.ui.util.UIUtil; import com.fr.log.FineLoggerFactory; import com.fr.module.Activator; @@ -110,6 +111,9 @@ public class DesignerStartupPageActivator extends Activator { // 将选中的环境设置为当前环境 StartupWorkspaceBean selectWorkspaceInfo = model.getSelectWorkspaceInfo(); DesignerEnvManager.getEnvManager().setCurEnvName(selectWorkspaceInfo.getName()); + UIUtil.invokeLaterIfNeeded(() -> { + DesignerContext.getDesignerFrame().setTitle(); + }); } private void launchAfterWarmup(DesignerPreWarmTask warmTask) {