Browse Source

Merging in latest from upstream (DESIGN/design:refs/heads/release/11.0)

* commit '02ce862c531bbdb98add973197c09098ba81b254':
  无jira 补报错日志
  REPORT-109802 【控件显示增强】插件打包报错处理
  REPORT-109711 F0051新建的模版触发保存没有数据
  REPORT-109660 F0052拿不到数据
  REPORT-109660 F0052拿不到数据
release/11.0
Obo-王学仁 12 months ago
parent
commit
d41bedeaac
  1. 1
      designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  3. 12
      designer-base/src/main/java/com/fr/design/mainframe/messagecollect/StartErrorMessageCollector.java
  4. 8
      designer-base/src/main/java/com/fr/startup/ui/StartupPageWindow.java

1
designer-base/src/main/java/com/fr/design/data/datapane/connect/DatabaseConnectionPane.java

@ -462,6 +462,7 @@ public abstract class DatabaseConnectionPane<E extends com.fr.data.impl.Connecti
} catch (InterruptedException e) { } catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} catch (ExecutionException e) { } catch (ExecutionException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
dealWithException(e); dealWithException(e);
} }
} }

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

@ -1783,6 +1783,8 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
CallbackSaveWorker worker = new CallbackSaveWorker(new Callable<Boolean>() { CallbackSaveWorker worker = new CallbackSaveWorker(new Callable<Boolean>() {
@Override @Override
public Boolean call() throws Exception { public Boolean call() throws Exception {
TemplateSaveInfoContext.getInstance().startRecord();
TemplateSaveInfoContext.getInstance().collectInfo(template.suffix());
return saveAs(finalEditingFILE, sourceFile, oldName); return saveAs(finalEditingFILE, sourceFile, oldName);
} }
}, this); }, this);

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe.messagecollect; package com.fr.design.mainframe.messagecollect;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.errorinfo.ErrorInfo; import com.fr.design.mainframe.errorinfo.ErrorInfo;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
@ -7,6 +8,9 @@ import com.fr.stable.StringUtils;
import com.fr.start.common.DesignerStartupContext; import com.fr.start.common.DesignerStartupContext;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/** /**
* *
* @author hades * @author hades
@ -17,6 +21,7 @@ public class StartErrorMessageCollector {
private static final StartErrorMessageCollector INSTANCE = new StartErrorMessageCollector(); private static final StartErrorMessageCollector INSTANCE = new StartErrorMessageCollector();
private ExecutorService executorService = Executors.newSingleThreadExecutor(new NamedThreadFactory(StartErrorMessageCollector.this.getClass()));
private String uuid; private String uuid;
private String activeKey; private String activeKey;
@ -42,6 +47,13 @@ public class StartErrorMessageCollector {
errorInfo.saveAsJSON(); errorInfo.saveAsJSON();
} }
/**
* 异步记录
*/
public void asyncRecord(String id, String msg, String detail) {
executorService.submit(() -> record(id, msg, detail));
}
public void record(String id, String msg) { public void record(String id, String msg) {
record(id, msg, StringUtils.EMPTY); record(id, msg, StringUtils.EMPTY);
} }

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

@ -1,6 +1,7 @@
package com.fr.startup.ui; package com.fr.startup.ui;
import com.fr.base.svg.IconUtils; import com.fr.base.svg.IconUtils;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.dialog.UIExpandDialog; import com.fr.design.dialog.UIExpandDialog;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
@ -8,6 +9,8 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.VerticalFlowLayout; import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.mainframe.messagecollect.StartErrorMessageCollector;
import com.fr.design.mainframe.messagecollect.entity.DesignerErrorMessage;
import com.fr.design.ui.util.UIUtil; import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.ColorUtils; import com.fr.design.utils.ColorUtils;
import com.fr.design.utils.ThemeUtils; import com.fr.design.utils.ThemeUtils;
@ -49,6 +52,8 @@ import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/** /**
* 启动页 * 启动页
@ -269,6 +274,9 @@ public class StartupPageWindow extends JFrame {
setEnabled(true); setEnabled(true);
}); });
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
StartErrorMessageCollector.getInstance().asyncRecord(DesignerErrorMessage.UNEXCEPTED_START_FAILED.getId(),
DesignerErrorMessage.UNEXCEPTED_START_FAILED.getMessage(),
e.getMessage());
} finally { } finally {
loadingPanel.hide(); loadingPanel.hide();
} }

Loading…
Cancel
Save