Browse Source

REPORT-76091 【迭代】【起始页】不打开任何报表,启动,不能新建fvs

兼容 fvs 的插件,并且规避 npe
feature/x
Harrison 2 years ago
parent
commit
7c5328b14b
  1. 2
      designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

2
designer-base/src/main/java/com/fr/design/file/HistoryTemplateListCache.java

@ -19,6 +19,7 @@ import com.fr.plugin.context.PluginContext;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.third.org.apache.commons.io.FilenameUtils; import com.fr.third.org.apache.commons.io.FilenameUtils;
import org.jetbrains.annotations.Nullable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -98,6 +99,7 @@ public class HistoryTemplateListCache implements CallbackEvent {
} }
@Nullable
public JTemplate<?, ?> getCurrentEditingTemplate() { public JTemplate<?, ?> getCurrentEditingTemplate() {
return this.editingTemplate; return this.editingTemplate;
} }

2
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -1088,7 +1088,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
} }
JTemplate jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate jt = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (jt != null) { if (JTemplate.isValid(jt)) {
DesignerEnvManager.getEnvManager().setLastOpenFile(jt.getEditingFILE().getPath()); DesignerEnvManager.getEnvManager().setLastOpenFile(jt.getEditingFILE().getPath());
} }

Loading…
Cancel
Save