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) {