|
|
|
@ -181,7 +181,7 @@ public class SaveSomeTemplatePane extends BasicPane {
|
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
public boolean showSavePane(@Nullable MultiTemplateTabPane.CloseOption option, boolean judgeJTemplateMustSave) { |
|
|
|
|
populate(option, judgeJTemplateMustSave); |
|
|
|
|
initAndPopulate(option, judgeJTemplateMustSave); |
|
|
|
|
//如果有未保存的文件 ,则跳出保存对话框,选择要存储的项目
|
|
|
|
|
if (!unSavedTemplate.isEmpty()) { |
|
|
|
|
dialog.setVisible(true); |
|
|
|
@ -195,7 +195,7 @@ public class SaveSomeTemplatePane extends BasicPane {
|
|
|
|
|
return HistoryTemplateListPane.getInstance().getHistoryList(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void populate(@Nullable MultiTemplateTabPane.CloseOption option, boolean judgeJTemplateMustSave) { |
|
|
|
|
private void initAndPopulate(@Nullable MultiTemplateTabPane.CloseOption option, boolean judgeJTemplateMustSave) { |
|
|
|
|
java.util.List<JTemplate<?, ?>> opendedTemplate = getOpenedTemplatesToProcess(); |
|
|
|
|
JTemplate<?, ?> currentTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); |
|
|
|
|
int currentIndex = opendedTemplate.indexOf(currentTemplate); |
|
|
|
|