ju 7 years ago
parent
commit
2f686922d8
  1. 25
      designer_base/src/com/fr/start/BaseDesigner.java

25
designer_base/src/com/fr/start/BaseDesigner.java

@ -100,6 +100,10 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
}
}
}
initLookAndFeel(args, splashWindow);
}
private void initLookAndFeel(String[] args, SplashWindow splashWindow) {
// 初始化look and feel.这个在预加载之前执行是因为lookAndFeel里的东西,预加载时也要用到
DesignUtils.initLookAndFeel();
@ -251,6 +255,18 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
file = FILEFactory.createFILE(FILEFactory.ENV_PREFIX
+ DesignerEnvManager.getEnvManager().getLastOpenFile());
}
isException = openFile(df, isException, file);
} catch (Exception e) {
FRLogger.getLogger().error(e.getMessage(), e);
if (!isException) {
showDesignerFrame(args, df, true);
} else {
System.exit(0);
}
}
}
private boolean openFile(final DesignerFrame df, boolean isException, FILE file) {
//启动时打开指定文件的接口
DesignerStartOpenFileProcessor processor = ExtraDesignClassManager.getInstance().getSingle(DesignerStartOpenFileProcessor.XML_TAG);
@ -277,14 +293,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
}
});
df.setVisible(true);
} catch (Exception e) {
FRLogger.getLogger().error(e.getMessage(), e);
if (!isException) {
showDesignerFrame(args, df, true);
} else {
System.exit(0);
}
}
return isException;
}

Loading…
Cancel
Save