|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.fr.startup.ui; |
|
|
|
|
|
|
|
|
|
import com.fr.base.extension.FileExtension; |
|
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
|
import com.fr.design.env.DesignerWorkspaceInfo; |
|
|
|
|
import com.fr.design.env.DesignerWorkspaceType; |
|
|
|
@ -19,7 +20,8 @@ import java.util.stream.Collectors;
|
|
|
|
|
* created by Harrison on 2022/07/06 |
|
|
|
|
**/ |
|
|
|
|
public class StartupPageModel { |
|
|
|
|
|
|
|
|
|
private static final String FRM = "frm"; |
|
|
|
|
private static final String FORM = "form"; |
|
|
|
|
private StartupWorkspaceBean selectWorkspaceInfo; |
|
|
|
|
|
|
|
|
|
private List<StartupWorkspaceBean> workspaceInfos = new ArrayList<>(); |
|
|
|
@ -57,7 +59,13 @@ public class StartupPageModel {
|
|
|
|
|
for (StartupWorkspaceBean info : infos) { |
|
|
|
|
String name = info.getName(); |
|
|
|
|
List<String> recentFiles = envManager.getRecentOpenedFilePathList4Env(name); |
|
|
|
|
recentFileMap.put(name, recentFiles); |
|
|
|
|
List<String> checkFiles = new ArrayList<>(); |
|
|
|
|
for (String s : recentFiles) { |
|
|
|
|
if (!s.endsWith(FRM) && !s.endsWith(FORM)) { |
|
|
|
|
checkFiles.add(s); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
recentFileMap.put(name, checkFiles); |
|
|
|
|
} |
|
|
|
|
return new StartupPageModel(infos, recentFileMap); |
|
|
|
|
} |
|
|
|
|