|
|
|
@ -9,7 +9,6 @@ import com.fr.start.SplashContext;
|
|
|
|
|
import com.fr.start.common.DesignerStartupContext; |
|
|
|
|
import com.fr.start.module.StartupArgs; |
|
|
|
|
import com.fr.start.util.DesignerStartupPageUtil; |
|
|
|
|
import com.fr.start.warmup.DesignerPreWarmTask; |
|
|
|
|
import com.fr.startup.metric.DesignerMetrics; |
|
|
|
|
import com.fr.startup.metric.DesignerStartupModel; |
|
|
|
|
import com.fr.startup.ui.StartupPageModel; |
|
|
|
@ -63,10 +62,6 @@ public class DesignerStartupPageActivator extends Activator {
|
|
|
|
|
// 启动页关闭
|
|
|
|
|
SplashContext.getInstance().hide(); |
|
|
|
|
|
|
|
|
|
// 预热任务启动
|
|
|
|
|
DesignerPreWarmTask warmTask = new DesignerPreWarmTask(); |
|
|
|
|
warmTask.start(); |
|
|
|
|
|
|
|
|
|
// 即时暂停
|
|
|
|
|
suspendRecorder(context); |
|
|
|
|
|
|
|
|
@ -79,21 +74,21 @@ public class DesignerStartupPageActivator extends Activator {
|
|
|
|
|
model.setOpenLastTemplateRunnable(() -> { |
|
|
|
|
context.setOpenLastFile(true); |
|
|
|
|
handleModel(model); |
|
|
|
|
launchAfterWarmup(warmTask); |
|
|
|
|
launchAfterWarmup(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// selectAndOpenEmpty
|
|
|
|
|
model.setOpenEmptyTemplateRunnable(() -> { |
|
|
|
|
context.setOpenEmpty(true); |
|
|
|
|
handleModel(model); |
|
|
|
|
launchAfterWarmup(warmTask); |
|
|
|
|
launchAfterWarmup(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// selectAndCreateNew
|
|
|
|
|
model.setCreateNewTemplateRunnable(() -> { |
|
|
|
|
context.setCreateNew(true); |
|
|
|
|
handleModel(model); |
|
|
|
|
launchAfterWarmup(warmTask); |
|
|
|
|
launchAfterWarmup(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
StartupPageWindow window = new StartupPageWindow(model); |
|
|
|
@ -123,7 +118,7 @@ public class DesignerStartupPageActivator extends Activator {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void launchAfterWarmup(DesignerPreWarmTask warmTask) { |
|
|
|
|
private void launchAfterWarmup() { |
|
|
|
|
|
|
|
|
|
StopWatch stopWatch = StopWatch.createStarted(); |
|
|
|
|
|
|
|
|
@ -133,9 +128,6 @@ public class DesignerStartupPageActivator extends Activator {
|
|
|
|
|
// 等待中切换
|
|
|
|
|
DesignerStartupContext.getInstance().setOnWaiting(false); |
|
|
|
|
|
|
|
|
|
warmTask.join(); |
|
|
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().debug("designer-startup-page warm up cost {} ms", stopWatch.getTime(TimeUnit.MILLISECONDS)); |
|
|
|
|
DesignerStartupContext.getInstance().setOnStartup(true); |
|
|
|
|
DesignerStartupPageUtil.enterWorkspace(); |
|
|
|
|
} finally { |
|
|
|
|