Browse Source

Pull request #13205: REPORT-109843 F0051,部分保存场景没有埋点 & REPORT-109834 F0052,起始页触发报错,starting拿到的是false

Merge in DESIGN/design from ~DESTINY.LIN/design:release/11.0 to release/11.0

* commit '87841d6235e8999dec4cbe7c662b9af4c5da3d3c':
  REPORT-109834 F0052,起始页触发报错,starting拿到的是false
  REPORT-109843 F0051,部分保存场景没有埋点
release/11.0
parent
commit
9e7ce79e74
  1. 7
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  2. 10
      designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java
  3. 1
      designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java
  4. 2
      designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java

7
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -878,7 +878,10 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
return saveAsTemplate(isShowLoc);
}
collectInfo();
return this.saveFile();
TemplateSaveInfoContext.getInstance().startCollect(template);
boolean result = this.saveFile();
TemplateSaveInfoContext.getInstance().stopCollect(result);
return result;
}
private boolean isCancelOperation(int operation) {
@ -967,7 +970,9 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
generateNewTemplateIdForSaveAs();
this.editingFILE = editingFILE;
TemplateSaveInfoContext.getInstance().startCollect(template);
boolean result = this.saveToNewFile(oldName);
TemplateSaveInfoContext.getInstance().stopCollect(result);
if (result) {
DesignerFrameFileDealerPane.getInstance().refresh();
collectInfoWhenSaveAs(originID);

10
designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java

@ -25,6 +25,7 @@ public class StartErrorMessageCollector {
private String uuid;
private String activeKey;
private boolean extraJudgeStart = false;
public static StartErrorMessageCollector getInstance() {
return INSTANCE;
@ -42,7 +43,7 @@ public class StartErrorMessageCollector {
errorInfo.setLogid(id);
errorInfo.setLog(msg);
errorInfo.setStackTrace(detail);
errorInfo.setStarting(DesignerStartupContext.getInstance().isOnStartup());
errorInfo.setStarting(DesignerStartupContext.getInstance().isOnStartup() || extraJudgeStart);
errorInfo.setRemote(!WorkContext.getCurrent().isLocal());
errorInfo.saveAsJSON();
}
@ -57,4 +58,11 @@ public class StartErrorMessageCollector {
public void record(String id, String msg) {
record(id, msg, StringUtils.EMPTY);
}
public void setExtraJudgeStart(boolean extraJudgeStart) {
this.extraJudgeStart = extraJudgeStart;
}
}

1
designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java

@ -279,6 +279,7 @@ public class StartupPageWindow extends JFrame {
e.getMessage());
} finally {
loadingPanel.hide();
StartErrorMessageCollector.getInstance().setExtraJudgeStart(false);
}
}
};

2
designer-realize/src/main/java/com/fr/start/module/optimized/DesignerStartupPageActivator.java

@ -2,6 +2,7 @@ package com.fr.start.module.optimized;
import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.messagecollect.StartErrorMessageCollector;
import com.fr.design.ui.util.UIUtil;
import com.fr.log.FineLoggerFactory;
import com.fr.module.Activator;
@ -164,6 +165,7 @@ public class DesignerStartupPageActivator extends Activator {
UIUtil.invokeLaterIfNeeded(() -> {
// 换到 awt 线程中关闭,不然异步会出现问题。
DesignerStartupContext.getInstance().setOnStartup(false);
StartErrorMessageCollector.getInstance().setExtraJudgeStart(true);
recordStartupEnd(stopWatch);
});
markComplete();

Loading…
Cancel
Save