|
|
@ -2,6 +2,7 @@ package com.fr.design.worker.open; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
|
|
|
import com.fr.design.mainframe.DesignerFrameFileDealerPane; |
|
|
|
import com.fr.design.mainframe.EastRegionContainerPane; |
|
|
|
import com.fr.design.mainframe.EastRegionContainerPane; |
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
import com.fr.design.worker.WorkerManager; |
|
|
|
import com.fr.design.worker.WorkerManager; |
|
|
@ -69,21 +70,22 @@ public class OpenWorker<T> extends SwingWorker<T, Void> { |
|
|
|
DesignerContext.getDesignerFrame().addAndActivateJTemplate(book); |
|
|
|
DesignerContext.getDesignerFrame().addAndActivateJTemplate(book); |
|
|
|
HistoryTemplateListCache.getInstance().replaceCurrentEditingTemplate(book); |
|
|
|
HistoryTemplateListCache.getInstance().replaceCurrentEditingTemplate(book); |
|
|
|
EastRegionContainerPane.getInstance().updateAllPropertyPane(); |
|
|
|
EastRegionContainerPane.getInstance().updateAllPropertyPane(); |
|
|
|
return; |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
// 当前tab页是其他模板
|
|
|
|
// 当前tab页是其他模板
|
|
|
|
for (int i = 0, len = HistoryTemplateListCache.getInstance().getHistoryCount(); i < len; i++) { |
|
|
|
for (int i = 0, len = HistoryTemplateListCache.getInstance().getHistoryCount(); i < len; i++) { |
|
|
|
JTemplate<?, ?> template = HistoryTemplateListCache.getInstance().get(i); |
|
|
|
JTemplate<?, ?> template = HistoryTemplateListCache.getInstance().get(i); |
|
|
|
if (ComparatorUtils.equals(template.getEditingFILE(), book.getEditingFILE())) { |
|
|
|
if (ComparatorUtils.equals(template.getEditingFILE(), book.getEditingFILE())) { |
|
|
|
template.whenClose(); |
|
|
|
template.whenClose(); |
|
|
|
HistoryTemplateListCache.getInstance().getHistoryList().set(i, book); |
|
|
|
HistoryTemplateListCache.getInstance().getHistoryList().set(i, book); |
|
|
|
return; |
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
FineLoggerFactory.getLogger().error(e.getMessage(), e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
DesignerFrameFileDealerPane.getInstance().stateChange(); |
|
|
|
WorkerManager.getInstance().removeWorker(taskName); |
|
|
|
WorkerManager.getInstance().removeWorker(taskName); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|