|
|
@ -25,7 +25,7 @@ import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.os.OperatingSystem; |
|
|
|
import com.fr.stable.os.OperatingSystem; |
|
|
|
import com.fr.start.ServerStarter; |
|
|
|
import com.fr.start.ServerStarter; |
|
|
|
import com.fr.start.common.DesignerStartupContext; |
|
|
|
import com.fr.start.common.DesignerStartupContext; |
|
|
|
import com.fr.startup.ui.StartupPageModel; |
|
|
|
import com.fr.start.common.DesignerStartupUtil; |
|
|
|
import com.fr.value.NotNullLazyValue; |
|
|
|
import com.fr.value.NotNullLazyValue; |
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
@ -48,7 +48,6 @@ import java.net.URI; |
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
import java.nio.charset.StandardCharsets; |
|
|
|
import java.util.Enumeration; |
|
|
|
import java.util.Enumeration; |
|
|
|
import java.util.Locale; |
|
|
|
import java.util.Locale; |
|
|
|
import java.util.Optional; |
|
|
|
|
|
|
|
import java.util.concurrent.Callable; |
|
|
|
import java.util.concurrent.Callable; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.ExecutorService; |
|
|
|
import java.util.concurrent.Executors; |
|
|
|
import java.util.concurrent.Executors; |
|
|
@ -216,18 +215,9 @@ public class DesignUtils { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|
DesignerStartupContext context = DesignerStartupContext.getInstance(); |
|
|
|
DesignerStartupContext context = DesignerStartupContext.getInstance(); |
|
|
|
|
|
|
|
|
|
|
|
// 如果在启动页展示中
|
|
|
|
// 如果在启动页展示中
|
|
|
|
if (context.isOnWaiting()) { |
|
|
|
if (DesignerStartupUtil.openTemplateIfOnWaiting(f)) { |
|
|
|
FileFILE fileFILE = new FileFILE(f); |
|
|
|
|
|
|
|
// 设置上一次启动模板为
|
|
|
|
|
|
|
|
DesignerEnvManager.getEnvManager().setLastOpenFile(fileFILE.getPath()); |
|
|
|
|
|
|
|
StartupPageModel model = context.getStartupPageModel(); |
|
|
|
|
|
|
|
Optional.ofNullable(model) |
|
|
|
|
|
|
|
.ifPresent((e) -> { |
|
|
|
|
|
|
|
// 执行上一次模板的启动
|
|
|
|
|
|
|
|
Runnable openLastTemplateRunnable = e.getOpenLastTemplateRunnable(); |
|
|
|
|
|
|
|
openLastTemplateRunnable.run(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
// 如果是在启动中
|
|
|
|
// 如果是在启动中
|
|
|
|