Browse Source

Pull request #11773: REPORT-92325 修复环境初始化之前调用远程设计接口导致NPE问题

Merge in DESIGN/design from ~LOY/design:release/11.0 to release/11.0

* commit '6c34870789d45bfb4eacc25eec6348455a3ced1b':
  REPORT-92325 修复环境初始化之前调用远程设计接口导致NPE问题
newui
loy-毕翔 2 years ago
parent
commit
5b62e3fb9e
  1. 6
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java

6
designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java

@ -68,7 +68,11 @@ public class VcsHelper implements JTemplateActionListener {
} }
private VcsHelper() { private VcsHelper() {
legacyMode = WorkContext.getCurrent().get(VcsOperator.class).isLegacyMode(); VcsOperator op = WorkContext.getCurrent().get(VcsOperator.class);
// 开了设计器启动页面时一开始取不到VcsOperator,通过下面的切换环境事件再取,这边判断下
if (op != null) {
legacyMode = op.isLegacyMode();
}
EventDispatcher.listen(WorkspaceEvent.AfterSwitch, new Listener<Workspace>() { EventDispatcher.listen(WorkspaceEvent.AfterSwitch, new Listener<Workspace>() {
@Override @Override
public void on(Event event, Workspace param) { public void on(Event event, Workspace param) {

Loading…
Cancel
Save