diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 9cb45918c1..88d2625d02 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java @@ -58,6 +58,7 @@ import javax.swing.SwingWorker.StateValue; import java.awt.Color; import java.awt.Rectangle; import java.io.File; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.FileWriter; @@ -206,9 +207,11 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { GeneralContext.setLocale(designerEnvManager.getLanguage()); try { XMLTools.readFileXML(designerEnvManager, designerEnvManager.getDesignerEnvFile()); - } catch (Exception e) { + } catch (FileNotFoundException e) { FineLoggerFactory.getLogger().error(e.getMessage(), e); XmlHandler.Self.handle(e); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); } // james:如果没有env定义,要设置一个默认的 diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index 2e5ea8bf6c..595f812afd 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -415,10 +415,7 @@ public class EnvChangeEntrance { @Override public void doOk() { - ProcessEventPipe pipe = FineProcessContext.getParentPipe(); - if (FineProcessContext.getParentPipe() != null) { - pipe.fire(new CarryMessageEvent(ReportState.ACTIVE.getValue())); - } + FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.ACTIVE.getValue())); if (!envListOkAction(envListPane, PopTipStrategy.NOW)) { DesignerExiter.getInstance().execute(); } diff --git a/designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java b/designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java index 288f6baa30..15b0e191e0 100644 --- a/designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java +++ b/designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceGenerator.java @@ -72,10 +72,7 @@ public class DesignerWorkspaceGenerator { enum RemoteHandler { SELF; public static void handle(DesignerWorkspaceInfo config) { - ProcessEventPipe eventPipe = FineProcessContext.getParentPipe(); - if (eventPipe != null) { - eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue())); - } + FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.STOP.getValue())); StartErrorMessageCollector.getInstance().record(DesignerErrorMessage.REMOTE_DESIGN_NO_RESPONSE.getId(), DesignerErrorMessage.REMOTE_DESIGN_NO_RESPONSE.getMessage(), StringUtils.EMPTY); diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java index 09a5b683dc..2bf64642f2 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignUtils.java @@ -291,10 +291,8 @@ public class DesignUtils { if (isDisplaySimSun(defaultLocale)) { guiFRFont = getNamedFont("SimSun"); - } else if (isDisplayDialog(defaultLocale)) { + } else { guiFRFont = getNamedFont("Dialog"); - } else { - guiFRFont = getNamedFont("Tahoma"); } //先初始化的设计器locale, 后初始化lookandfeel.如果顺序改了, 这边也要调整. diff --git a/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java b/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java index 254cc5e911..1ad1948bfa 100644 --- a/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java +++ b/designer-base/src/main/java/com/fr/design/utils/DesignerPort.java @@ -90,10 +90,7 @@ public class DesignerPort implements XMLReadable, XMLWriter { } public void resetPort() { - ProcessEventPipe eventPipe = FineProcessContext.getParentPipe(); - if (eventPipe != null) { - eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue())); - } + FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.STOP.getValue())); TipDialog dialog = new TipDialog(null, StringUtils.EMPTY, Toolkit.i18nText("Fine-Design_Port_Found_Port_Conflict"), diff --git a/designer-realize/src/main/java/com/fr/design/report/RichTextPane.java b/designer-realize/src/main/java/com/fr/design/report/RichTextPane.java index d2cb19e868..fa19c38f82 100644 --- a/designer-realize/src/main/java/com/fr/design/report/RichTextPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/RichTextPane.java @@ -1,6 +1,7 @@ package com.fr.design.report; import com.fr.base.BaseFormula; +import com.fr.base.FRContext; import com.fr.base.Style; import com.fr.design.cell.editor.RichTextToolBar; import com.fr.design.dialog.BasicPane; @@ -36,7 +37,7 @@ public class RichTextPane extends BasicPane { //12号字体有个奇怪的bug, 字体下部分渲染会截断一部分, 换其他字体没问题, 字体改大小也没问题. //直接弄个jtexarea放到jframe里也有同样问题, 不知道是字体渲染bug还是jdk问题 - public static final FRFont DEFAUL_FONT = FRFont.getInstance().applySize(13); + public static final FRFont DEFAUL_FONT = FRContext.getDefaultValues().getFRFont().applySize(13); private RichTextEditingPane textPane; //用于populate时动态更新按钮 diff --git a/designer-realize/src/main/java/com/fr/start/LifecycleFatalErrorHandler.java b/designer-realize/src/main/java/com/fr/start/LifecycleFatalErrorHandler.java index ef416416c9..a59d15faf3 100644 --- a/designer-realize/src/main/java/com/fr/start/LifecycleFatalErrorHandler.java +++ b/designer-realize/src/main/java/com/fr/start/LifecycleFatalErrorHandler.java @@ -49,10 +49,7 @@ public class LifecycleFatalErrorHandler { public void handle(FineLifecycleFatalError fatal) { SplashContext.getInstance().hide(); - ProcessEventPipe eventPipe = FineProcessContext.getParentPipe(); - if (eventPipe != null) { - eventPipe.fire(new CarryMessageEvent(ReportState.STOP.getValue())); - } + FineProcessContext.getParentPipe().fire(new CarryMessageEvent(ReportState.STOP.getValue())); map.get(fatal.getErrorType()).handle(fatal); }