Browse Source

REPORT-25730 最新的release设计器启动后一直报模板不存在

还需要判断是否存在
feature/big-screen
Harrison 5 years ago
parent
commit
db181c4505
  1. 7
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

7
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -171,11 +171,16 @@ public class TableDataTreePane extends BasicTableDataTreePane {
private void reloadCurrTemplate() { private void reloadCurrTemplate() {
JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate<?, ?> jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (jt != null && jt.getEditingFILE() != null) { if (accept(jt)) {
HistoryTemplateListCache.getInstance().closeSelectedReport(jt); HistoryTemplateListCache.getInstance().closeSelectedReport(jt);
DesignerContext.getDesignerFrame().openTemplate(jt.getEditingFILE()); DesignerContext.getDesignerFrame().openTemplate(jt.getEditingFILE());
} }
} }
private boolean accept(JTemplate<?, ?> jt) {
return jt != null && jt.getEditingFILE() != null && !jt.getEditingFILE().exists();
}
}, new PluginFilter() { }, new PluginFilter() {
@Override @Override
public boolean accept(PluginContext pluginContext) { public boolean accept(PluginContext pluginContext) {

Loading…
Cancel
Save