Browse Source

解决冲突,并提升代码质量

research/10.0
alex.sung 6 years ago
parent
commit
ef46f377b2
  1. 2
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 4
      designer-base/src/main/java/com/fr/design/RestartHelper.java
  3. 2
      designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java
  4. 2
      designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java
  5. 2
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java
  6. 6
      designer-base/src/main/java/com/fr/design/bbs/BBSLoginUtils.java
  7. 2
      designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java
  8. 2
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  9. 2
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java
  10. 4
      designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java
  11. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java
  12. 2
      designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java
  13. 2
      designer-base/src/main/java/com/fr/design/dialog/UIDialog.java
  14. 4
      designer-base/src/main/java/com/fr/design/extra/LoginWebBridge.java
  15. 2
      designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java
  16. 2
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java
  17. 6
      designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
  18. 2
      designer-base/src/main/java/com/fr/design/extra/QQLoginWebPane.java
  19. 2
      designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java
  20. 2
      designer-base/src/main/java/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java
  21. 2
      designer-base/src/main/java/com/fr/design/extra/exe/ReadUpdateOnlineExecutor.java
  22. 2
      designer-base/src/main/java/com/fr/design/extra/exe/SearchOnlineExecutor.java
  23. 8
      designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java
  24. 7
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractPreviewProvider.java
  25. 3
      designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java
  26. 30
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  27. 7
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  28. 2
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/DesignerLogHandler.java
  29. 6
      designer-base/src/main/java/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java
  30. 34
      designer-base/src/main/java/com/fr/design/preview/FormPreview.java
  31. 48
      designer-base/src/main/java/com/fr/design/preview/MobilePreview.java
  32. 2
      designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java
  33. 10
      designer-base/src/main/java/com/fr/env/RemoteEnvUtils.java
  34. 12
      designer-base/src/main/java/com/fr/start/BaseDesigner.java
  35. 31
      designer-base/src/main/java/com/fr/start/ServerStarter.java
  36. 4
      designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java
  37. 89
      designer-base/src/main/java/com/fr/start/server/FineEmbedServerMonitor.java
  38. BIN
      designer-base/src/main/resources/com/fr/design/images/buttonicon/mobile.png
  39. BIN
      designer-base/src/main/resources/com/fr/design/images/buttonicon/mobileb24.png
  40. 2
      designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/UIGroupExtensionPane.java
  41. 6
      designer-chart/src/main/java/com/fr/van/chart/custom/CustomPlotDesignerPaneFactory.java
  42. 2
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java
  43. 14
      designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java
  44. 2
      designer-form/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptorPane.java
  45. 2
      designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java
  46. 2
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveAction.java
  47. 2
      designer-form/src/main/java/com/fr/design/designer/properties/FRAbsoluteBodyLayoutPropertiesGroupModel.java
  48. 2
      designer-form/src/main/java/com/fr/design/designer/properties/FRFitLayoutPropertiesGroupModel.java
  49. 2
      designer-form/src/main/java/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java
  50. 2
      designer-form/src/main/java/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java
  51. 47
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  52. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java
  53. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
  54. 2
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java
  55. 2
      designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java
  56. 20
      designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java
  57. 3
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java
  58. 2
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java
  59. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/DocumentModel.java
  60. 2
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/FileModel.java
  61. 2
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/PluginModel.java
  62. 16
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  63. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java
  64. 2
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSDialog.java
  65. 4
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSLoginDialog.java
  66. 4
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java
  67. 4
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java
  68. 2
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java
  69. 2
      designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java
  70. 2
      designer-realize/src/main/java/com/fr/design/present/CellWriteAttrPane.java
  71. 2
      designer-realize/src/main/java/com/fr/design/report/RichTextEditingPane.java
  72. 4
      designer-realize/src/main/java/com/fr/design/report/RichTextPane.java
  73. 2
      designer-realize/src/main/java/com/fr/design/report/share/ConfusionTableDataPane.java
  74. 2
      designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java
  75. 2
      designer-realize/src/main/java/com/fr/start/Designer.java
  76. 9
      designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

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

@ -621,7 +621,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
fout.flush();
fout.close();
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}

4
designer-base/src/main/java/com/fr/design/RestartHelper.java

@ -166,7 +166,7 @@ public class RestartHelper {
FineLoggerFactory.getLogger().error("restart lock null!");
}
}catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
if (OperatingSystem.isMacOS()) {
restartInMacOS(installHome, filesToBeDelete);
@ -174,7 +174,7 @@ public class RestartHelper {
restartInWindows(installHome, filesToBeDelete);
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} finally {
DesignerContext.getDesignerFrame().exit();
}

2
designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java

@ -27,7 +27,7 @@ public final class WebPreviewUtils {
@SuppressWarnings("unchecked")
public static void preview(JTemplate<?, ?> jt, PreviewProvider provider) {
String baseRoute = jt.route();
actionPerformed(jt, baseRoute, provider == null ? Collections.EMPTY_MAP : provider.parametersForPreview(), ParameterConstants.VIEWLET);
actionPerformed(jt, baseRoute, provider == null ? Collections.EMPTY_MAP : provider.parametersForPreview(), provider.getActionType());
}
private static void actionPerformed(JTemplate<?, ?> jt, String baseRoute, Map<String, Object> map, String actionType) {

2
designer-base/src/main/java/com/fr/design/actions/help/FeedBackPane.java

@ -279,7 +279,7 @@ public class FeedBackPane extends BasicPane {
try {
return DesignUtils.sendFeedBack(feedBackInfo);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return false;
}
}

2
designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigPane.java

@ -228,7 +228,7 @@ public class AlphaFineConfigPane extends BasicPane {
DesignerEnvManager.loadLogSetting();
DesignerEnvManager.getEnvManager().saveXMLFile();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}

6
designer-base/src/main/java/com/fr/design/bbs/BBSLoginUtils.java

@ -32,7 +32,7 @@ public class BBSLoginUtils {
});
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
@ -58,7 +58,7 @@ public class BBSLoginUtils {
});
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
@ -71,7 +71,7 @@ public class BBSLoginUtils {
try {
MarketConfig.getInstance().setBBsAttr(bbsAttr);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}

2
designer-base/src/main/java/com/fr/design/condition/LiteConditionPane.java

@ -966,7 +966,7 @@ public abstract class LiteConditionPane<T extends Condition> extends BasicBeanPa
try{
newCondition = (Condition)joinCondition.getCondition().clone();
}catch (CloneNotSupportedException e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return newCondition;
}

2
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -488,7 +488,7 @@ public abstract class DesignTableDataManager {
}
rs.release();
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}

2
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePane.java

@ -278,7 +278,7 @@ public class ChoosePane extends BasicBeanPane<DataBaseItems> implements Refresha
schemaBox.setSelectedIndex(index);
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
schemaBox.setRefreshingModel(false);
schemaBox.removePopupMenuListener(listener);

4
designer-base/src/main/java/com/fr/design/data/datapane/ChoosePaneSupportFormula.java

@ -113,7 +113,7 @@ public class ChoosePaneSupportFormula extends ChoosePane {
selectedDSName = Utils.objectToString(ca.eval(BaseFormula.createFormulaBuilder().build(item)));
// selectedDSName = ParameterHelper.analyzeCurrentContextTableData4Templatee(item, parameters);
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
} else {
selectedDSName = item;
@ -156,7 +156,7 @@ public class ChoosePaneSupportFormula extends ChoosePane {
dsName = dsItem.startsWith("=") ? Utils.objectToString(ca.eval(BaseFormula.createFormulaBuilder().build(dsItem))) : dsItem;
tableName = tableItem.startsWith("=") ? Utils.objectToString(ca.eval(BaseFormula.createFormulaBuilder().build(tableItem))) : tableItem;
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
ori_ds_name = dsName;
ori_table_name = tableName;

2
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java

@ -146,7 +146,7 @@ public final class StoreProcedureDataWrapper implements TableDataWrapper {
}
return true;
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
return false;
}

2
designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java

@ -77,7 +77,7 @@ public final class StoreProcedureNameWrapper implements TableDataWrapper {
try {
procedureDataModel = DesignTableDataManager.createLazyDataModel(storeProcedure, needLoadingBar)[0];
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}

2
designer-base/src/main/java/com/fr/design/dialog/UIDialog.java

@ -166,7 +166,7 @@ public abstract class UIDialog extends JDialog {
l.doOk();
} catch (RuntimeException e) {
isDoOKSucceed = false;
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}
if (isDoOKSucceed) {

4
designer-base/src/main/java/com/fr/design/extra/LoginWebBridge.java

@ -150,7 +150,7 @@ public class LoginWebBridge {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}
@ -306,7 +306,7 @@ public class LoginWebBridge {
}
}
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}

2
designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java

@ -116,7 +116,7 @@ public class PluginOperateUtils {
JSONArray jsonArray = new JSONArray(result);
resultArray = PluginUtils.filterPluginsFromVersion(jsonArray);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return resultArray.toString();
}

2
designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

@ -59,7 +59,7 @@ public class PluginUtils {
httpClient.asGet();
result = httpClient.getResponseText();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
} else {
result = PluginConstants.CONNECTION_404;

6
designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java

@ -350,7 +350,7 @@ public class PluginWebBridge {
Task<Void> task = new PluginTask<>(webEngine, callback, new GetPluginFromStoreExecutor(new JSONObject(info)));
threadPoolExecutor.submit(task);
} catch (JSONException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
@ -486,10 +486,10 @@ public class PluginWebBridge {
}
} catch (NullPointerException e) {
//此为uri为空时抛出异常
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} catch (IOException e) {
//此为无法获取系统默认浏览器
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}

2
designer-base/src/main/java/com/fr/design/extra/QQLoginWebPane.java

@ -149,7 +149,7 @@ public class QQLoginWebPane extends JFXPanel {
}
});
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}

2
designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java

@ -123,7 +123,7 @@ public class WebViewDlgHelper {
try {
CommonIOUtils.copy(new File(mainJsPath), new File(installHome));
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}

2
designer-base/src/main/java/com/fr/design/extra/exe/GetPluginFromStoreExecutor.java

@ -72,7 +72,7 @@ public class GetPluginFromStoreExecutor implements Executor {
JSONArray resultJSONArray = PluginUtils.filterPluginsFromVersion(resultArr);
result = resultJSONArray.toString();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
} else {
result = PluginConstants.CONNECTION_404;

2
designer-base/src/main/java/com/fr/design/extra/exe/ReadUpdateOnlineExecutor.java

@ -42,7 +42,7 @@ public class ReadUpdateOnlineExecutor implements Executor {
}
result = jsonArray.toString();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}

2
designer-base/src/main/java/com/fr/design/extra/exe/SearchOnlineExecutor.java

@ -50,7 +50,7 @@ public class SearchOnlineExecutor implements Executor {
JSONArray resultJSONArray = PluginUtils.filterPluginsFromVersion(jsonArray);
result = resultJSONArray.toString();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}

8
designer-base/src/main/java/com/fr/design/fun/PreviewProvider.java

@ -54,4 +54,12 @@ public interface PreviewProvider extends Mutable{
*/
Map<String, Object> parametersForPreview();
/**
* 该种预览方式下对模板的处理方式
* 分页填报等需要计算输出模板移动端预览直接输出url
* @return 处理方式
*/
String getActionType();
}

7
designer-base/src/main/java/com/fr/design/fun/impl/AbstractPreviewProvider.java

@ -3,6 +3,7 @@ package com.fr.design.fun.impl;
import com.fr.design.fun.PreviewProvider;
import com.fr.design.mainframe.JTemplate;
import com.fr.general.ComparatorUtils;
import com.fr.general.web.ParameterConstants;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
@ -45,4 +46,10 @@ public abstract class AbstractPreviewProvider extends AbstractProvider implement
public int hashCode() {
return nameForPopupItem().hashCode();
}
@Override
public String getActionType() {
return ParameterConstants.VIEWLET;
}
}

3
designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java

@ -77,4 +77,7 @@ public class ProgressDialog extends UIDialog {
centerDialog.dispose();
super.dispose();
}
public void updateLoadingText(String text) {
this.text.setText(text);
}
}

30
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -1153,4 +1153,34 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
return progressDialog;
}
public void showProgressDialog() {
progressDialog.setVisible(true);
}
/**
* 隐藏进度框
*/
public void hideProgressDialog() {
progressDialog.setVisible(false);
}
/**
* 更新进度框进度
* @param progress
*/
public void updateProgress(int progress) {
progressDialog.setProgressValue(progress);
}
/**
* 释放进度框
*/
public void disposeProgressDialog() {
progressDialog.dispose();
}
}

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext;
import com.fr.base.Parameter;
import com.fr.base.ScreenResolution;
@ -520,7 +521,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
// return false;
// }
// } catch (Exception e) {
// FineLoggerFactory.getLogger().error(e.getMessage());
// FineLoggerFactory.getLogger().error(e.getMessage(), e);
// }
@ -1006,7 +1007,9 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
* @return
*/
public Icon getPreviewLargeIcon() {
return UIConstants.RUN_BIG_ICON;
PreviewProvider provider = getPreviewType();
String iconPath = provider.iconPathForLarge();
return BaseUtils.readIcon(iconPath);
}
/**

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

@ -257,7 +257,7 @@ public class DesignerLogHandler {
try {
doc.insertString(doc.getLength(), str, attrSet);
} catch (BadLocationException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}

6
designer-base/src/main/java/com/fr/design/mainframe/templateinfo/TemplateInfoCollector.java

@ -132,11 +132,11 @@ public class TemplateInfoCollector<T extends BaseBook> implements Serializable,
}
xmlInputStream.close();
} catch (FileNotFoundException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
} catch (IOException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
} catch (XMLStreamException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}

34
designer-base/src/main/java/com/fr/design/preview/FormPreview.java

@ -0,0 +1,34 @@
package com.fr.design.preview;
import com.fr.design.fun.impl.AbstractPreviewProvider;
import com.fr.locale.InterProviderFactory;
/**
* @author kerry
* @date 2018/5/22
*/
public class FormPreview extends AbstractPreviewProvider {
private static final int PREVIEW_TYPE = 5;
@Override
public String nameForPopupItem() {
return InterProviderFactory.getProvider().getLocText("Fine-Design_Form_M_Form_Preview");
}
@Override
public String iconPathForPopupItem() {
return "com/fr/design/images/buttonicon/runs.png";
}
@Override
public String iconPathForLarge() {
return "com/fr/design/images/buttonicon/run24.png";
}
@Override
public int previewTypeCode() {
return PREVIEW_TYPE;
}
}

48
designer-base/src/main/java/com/fr/design/preview/MobilePreview.java

@ -0,0 +1,48 @@
package com.fr.design.preview;
import com.fr.design.fun.impl.AbstractPreviewProvider;
import com.fr.general.Inter;
import java.util.HashMap;
import java.util.Map;
/**
* @author kerry
* @date 2018/5/11
*/
public class MobilePreview extends AbstractPreviewProvider {
private static final int PREVIEW_TYPE = 4;
private static final String ACTION_TYPE = "path";
@Override
public String nameForPopupItem() {
return Inter.getLocText("Fine-Engine_Mobile_Preview");
}
@Override
public String iconPathForPopupItem() {
return "com/fr/design/images/buttonicon/mobile.png";
}
@Override
public String iconPathForLarge() {
return "com/fr/design/images/buttonicon/mobileb24.png";
}
@Override
public int previewTypeCode() {
return PREVIEW_TYPE;
}
@Override
public String getActionType() {
return ACTION_TYPE;
}
@Override
public Map<String, Object> parametersForPreview() {
Map<String, Object> map = new HashMap<String, Object>();
map.put("op", "mobile");
return map;
}
}

2
designer-base/src/main/java/com/fr/design/style/color/ColorPicker.java

@ -73,7 +73,7 @@ public class ColorPicker extends JDialog implements ActionListener
try {
Thread.sleep(100); // 等待弹窗关闭
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
colorPickerPanel.captureScreen();
}

10
designer-base/src/main/java/com/fr/env/RemoteEnvUtils.java vendored

@ -67,7 +67,7 @@
// .build();
// inputStream = httpClient.execute(request, responseHandler);
// } catch (IOException e) {
// FRContext.getLogger().error(e.getMessage());
// FRContext.getLogger().error(e.getMessage(), e);
// }
// return inputStream;
// }
@ -90,7 +90,7 @@
// .build();
// inputStream = httpClient.execute(request, responseHandler);
// } catch (IOException e) {
// FRContext.getLogger().error(e.getMessage());
// FRContext.getLogger().error(e.getMessage(), e);
// }
// return inputStream;
// }
@ -112,7 +112,7 @@
// inputStream = httpClient.execute(request, responseHandler);
//
// } catch (IOException e) {
// FRContext.getLogger().error(e.getMessage());
// FRContext.getLogger().error(e.getMessage(), e);
// }
// return inputStream;
// }
@ -137,7 +137,7 @@
// .build();
// inputStream = httpClient.execute(request, responseHandler);
// } catch (IOException e) {
// FRContext.getLogger().error(e.getMessage());
// FRContext.getLogger().error(e.getMessage(), e);
// }
//
// return inputStream;
@ -158,7 +158,7 @@
// .build();
// inputStream = httpClient.execute(request, responseHandler);
// } catch (IOException e) {
// FRContext.getLogger().error(e.getMessage());
// FRContext.getLogger().error(e.getMessage(), e);
// }
// return inputStream;
// }

12
designer-base/src/main/java/com/fr/start/BaseDesigner.java

@ -31,6 +31,10 @@ import java.lang.reflect.Method;
* The main class of Report Designer.
*/
public abstract class BaseDesigner extends ToolBarMenuDock {
private static final int PERCENT_TEN = 10;
private static final int PERCENT_SIXTY = 60;
private static final int PERCENT_NINTY= 90;
private static final int PERCENT_COMPLETE= 100;
private static final int LOAD_TREE_MAXNUM = 10;
@ -51,15 +55,15 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
public void show(final String[] args) {
collectUserInformation();
DesignerContext.getDesignerFrame().getProgressDialog().setProgressValue(10);
DesignerContext.getDesignerFrame().updateProgress(PERCENT_TEN);
showDesignerFrame(args, DesignerContext.getDesignerFrame(), false);
DesignerContext.getDesignerFrame().getProgressDialog().setProgressValue(60);
DesignerContext.getDesignerFrame().updateProgress(PERCENT_SIXTY);
DesignerContext.getDesignerFrame().refreshEnv();
DesignerContext.getDesignerFrame().getProgressDialog().setProgressValue(90);
DesignerContext.getDesignerFrame().updateProgress(PERCENT_NINTY);
for (int i = 0; !TemplateTreePane.getInstance().getTemplateFileTree().isTemplateShowing() && i < LOAD_TREE_MAXNUM; i++) {
TemplateTreePane.getInstance().getTemplateFileTree().refresh();
}
DesignerContext.getDesignerFrame().getProgressDialog().setProgressValue(100);
DesignerContext.getDesignerFrame().updateProgress(PERCENT_COMPLETE);
}

31
designer-base/src/main/java/com/fr/start/ServerStarter.java

@ -5,20 +5,21 @@ import com.fr.base.ServerConfig;
import com.fr.design.DesignerEnvManager;
import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.start.server.FineEmbedServer;
import com.fr.start.server.FineEmbedServerMonitor;
import com.fr.workspace.WorkContext;
import javax.swing.*;
import java.awt.*;
import javax.swing.JOptionPane;
import java.awt.Desktop;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class ServerStarter {
@ -57,10 +58,24 @@ public class ServerStarter {
*
* @param url 指定路径
*/
public static void browserURLWithLocalEnv(String url) {
FineEmbedServer.start();
browser(url);
public static void browserURLWithLocalEnv(final String url) {
if(!FineEmbedServerMonitor.getInstance().isComplete()){
FineEmbedServerMonitor.getInstance().monitor();
ExecutorService service = Executors.newSingleThreadExecutor();
service.submit(new Runnable() {
@Override
public void run() {
FineEmbedServer.start();
browser(url);
}
});
service.shutdown();
}else{
FineEmbedServer.start();
browser(url);
}
}
private static void browser(String uri) {

4
designer-base/src/main/java/com/fr/start/server/FineEmbedServerActivator.java

@ -30,11 +30,15 @@ public class FineEmbedServerActivator extends Activator {
public synchronized void start() {
try {
FineEmbedServerMonitor.getInstance().reset();
//初始化tomcat
initTomcat();
tomcat.start();
} catch (LifecycleException e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}finally {
FineEmbedServerMonitor.getInstance().setComplete();
}
}

89
designer-base/src/main/java/com/fr/start/server/FineEmbedServerMonitor.java

@ -0,0 +1,89 @@
package com.fr.start.server;
import com.fr.design.mainframe.DesignerContext;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
import com.fr.event.Null;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* 内置服务器启动监视器
* Created by zack on 2018/8/21.
*/
public class FineEmbedServerMonitor {
private int progress;
private static final int COMPLETE = 100;//启动完成
private static final int STEP = 5;//随便设置一个假的进度条
private static final int STEP_HEARTBEAT = 2000;//2秒更新进度
private static volatile FineEmbedServerMonitor monitor;
private FineEmbedServerMonitor() {
}
static {
EventDispatcher.listen(EmbedServerEvent.AfterStop, new Listener<Null>() {
@Override
public void on(Event event, Null aNull) {
DesignerContext.getDesignerFrame().disposeProgressDialog();
}
});
}
public static FineEmbedServerMonitor getInstance() {
if (monitor == null) {
synchronized (FineEmbedServerMonitor.class) {
if (monitor == null) {
monitor = new FineEmbedServerMonitor();
}
}
}
return monitor;
}
public int getProgress() {
if (progress == COMPLETE) {
return progress;
} else {
progress += STEP;
return progress;
}
}
public void setComplete() {
this.progress = COMPLETE;
}
public void reset() {
this.progress = 0;
}
public boolean isComplete() {
return this.progress == COMPLETE;
}
public void monitor() {
ExecutorService service = Executors.newSingleThreadExecutor();
service.submit(new Runnable() {
@Override
public void run() {
while (!isComplete()) {
if (!DesignerContext.getDesignerFrame().getProgressDialog().isVisible()) {
DesignerContext.getDesignerFrame().showProgressDialog();
DesignerContext.getDesignerFrame().getProgressDialog().updateLoadingText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Loading_Embed_Server"));
}
DesignerContext.getDesignerFrame().updateProgress(getProgress());
try {
Thread.sleep(STEP_HEARTBEAT);
} catch (InterruptedException ignore) {
}
}
DesignerContext.getDesignerFrame().disposeProgressDialog();
}
});
service.shutdown();
}
}

BIN
designer-base/src/main/resources/com/fr/design/images/buttonicon/mobile.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

BIN
designer-base/src/main/resources/com/fr/design/images/buttonicon/mobileb24.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

2
designer-chart/src/main/java/com/fr/design/chart/series/PlotSeries/UIGroupExtensionPane.java

@ -477,7 +477,7 @@ public class UIGroupExtensionPane extends BasicPane {
try {
list.setSelectedIndices(null);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}

6
designer-chart/src/main/java/com/fr/van/chart/custom/CustomPlotDesignerPaneFactory.java

@ -59,7 +59,7 @@ public class CustomPlotDesignerPaneFactory {
Constructor<? extends BasicBeanPane<Plot> > constructor = cl.getConstructor();
return constructor.newInstance();
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return null;
@ -89,7 +89,7 @@ public class CustomPlotDesignerPaneFactory {
Constructor<? extends AbstractTableDataContentPane > constructor = cl.getConstructor(ChartDataPane.class);
return constructor.newInstance(parent);
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return new CategoryPlotTableDataContentPane(parent);
@ -125,7 +125,7 @@ public class CustomPlotDesignerPaneFactory {
return constructor.newInstance(plot, parent);
}
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return new VanChartAxisPane(plot,parent);

2
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartCustomPlotSelectPane.java

@ -250,7 +250,7 @@ public class VanChartCustomPlotSelectPane extends BasicBeanPane<Chart> {
}
}
} catch (CloneNotSupportedException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}

14
designer-chart/src/main/java/com/fr/van/chart/designer/PlotFactory.java

@ -198,7 +198,7 @@ public class PlotFactory {
Constructor<? extends VanChartPlotLabelPane > constructor = cl.getConstructor(Plot.class, VanChartStylePane.class);
return constructor.newInstance(plot, stylePane);
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return new VanChartPlotLabelPane(plot, stylePane);
@ -218,7 +218,7 @@ public class PlotFactory {
Constructor<? extends VanChartPlotLegendPane > constructor = cl.getConstructor(VanChartStylePane.class);
return constructor.newInstance(stylePane);
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return new VanChartPlotLegendPane(stylePane);
@ -238,7 +238,7 @@ public class PlotFactory {
Constructor<? extends VanChartPlotTooltipPane > constructor = cl.getConstructor(Plot.class, VanChartStylePane.class);
return constructor.newInstance(plot, stylePane);
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return new VanChartPlotTooltipPane(plot, stylePane);
@ -259,7 +259,7 @@ public class PlotFactory {
Constructor<? extends VanChartTooltipContentPane > constructor = cl.getConstructor(VanChartStylePane.class, JPanel.class);
return constructor.newInstance(parent, showOnPane);
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return new VanChartLabelContentPane(parent, showOnPane);
@ -280,7 +280,7 @@ public class PlotFactory {
Constructor<? extends VanChartTooltipContentPane > constructor = cl.getConstructor(VanChartStylePane.class, JPanel.class);
return constructor.newInstance(parent, showOnPane);
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return new VanChartTooltipContentPane(parent, showOnPane);
@ -301,7 +301,7 @@ public class PlotFactory {
Constructor<? extends VanChartPlotTooltipPane > constructor = cl.getConstructor(Plot.class);
return constructor.newInstance(plot);
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return new VanChartPlotRefreshTooltipPane(plot);
@ -321,7 +321,7 @@ public class PlotFactory {
Constructor<? extends VanChartTooltipContentPane > constructor = cl.getConstructor(VanChartStylePane.class, JPanel.class);
return constructor.newInstance(parent, showOnPane);
} catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return new VanChartRefreshTooltipContentPane(parent, showOnPane);

2
designer-form/src/main/java/com/fr/design/designer/creator/CRPropertyDescriptorPane.java

@ -103,7 +103,7 @@ public class CRPropertyDescriptorPane {
}
});
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
return component;
}

2
designer-form/src/main/java/com/fr/design/designer/creator/XWidgetCreator.java

@ -139,7 +139,7 @@ public abstract class XWidgetCreator extends XCreator {
this.setRolloverIcon(new ImageIcon(image1));
this.setPressedIcon(new ImageIcon(image));//按下去的图标
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}

2
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/TabMoveAction.java

@ -40,7 +40,7 @@ public class TabMoveAction extends FormUndoableAction {
FormHierarchyTreePane.getInstance().refreshDockingView();
}catch (Exception e){
xwCardTagLayout.setSwitchingTab(false);
FRLogger.getLogger().error(e.getMessage());
FRLogger.getLogger().error(e.getMessage(), e);
return false;
}
return true;

2
designer-form/src/main/java/com/fr/design/designer/properties/FRAbsoluteBodyLayoutPropertiesGroupModel.java

@ -170,7 +170,7 @@ public class FRAbsoluteBodyLayoutPropertiesGroupModel extends FRAbsoluteLayoutPr
return true;
}
catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return false;
}
}

2
designer-form/src/main/java/com/fr/design/designer/properties/FRFitLayoutPropertiesGroupModel.java

@ -175,7 +175,7 @@ public class FRFitLayoutPropertiesGroupModel implements GroupModel {
FormSelectionUtils.rebuildSelection(xfl, new Widget[]{xfl.toData()}));
}
}catch (Exception e){
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return false;
}
layout.setLayoutType(WBodyLayoutType.parse(state));

2
designer-form/src/main/java/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java

@ -50,7 +50,7 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable {
try {
propertyTableEditor = supportedDescriptor();
}catch (IntrospectionException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
groups.add(new PropertyGroup(new ReportAppPropertyGroupModel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Properties_Mobile"), xCreator, propertyTableEditor, designer)));

2
designer-form/src/main/java/com/fr/design/designer/properties/mobile/ElementCasePropertyTable.java

@ -92,7 +92,7 @@ public class ElementCasePropertyTable extends AbstractPropertyTable{
try {
propertyTableEditor = supportedDescriptor();
} catch (IntrospectionException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}

47
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -25,6 +25,7 @@ import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.properties.FormWidgetAuthorityEditPane;
import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener;
import com.fr.design.fun.PreviewProvider;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import com.fr.design.gui.ilable.UILabel;
@ -46,6 +47,8 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.parameter.ParameterPropertyPane;
import com.fr.design.preview.FormPreview;
import com.fr.design.preview.MobilePreview;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.utils.gui.LayoutUtils;
import com.fr.file.FILE;
@ -78,7 +81,9 @@ import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
private static final String FORM_CARD = "FORM";
@ -678,7 +683,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
*
*/
public Icon getPreviewLargeIcon() {
return UIConstants.RUN_BIG_ICON;
return super.getPreviewLargeIcon();
}
@Override
@ -693,14 +698,19 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
* @return 菜单
*/
public UIMenuItem[] createMenuItem4Preview() {
UIMenuItem form = new UIMenuItem(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_M_Form_Preview"), UIConstants.RUN_SMALL_ICON);
form.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
WebPreviewUtils.preview(JForm.this);
}
});
return new UIMenuItem[]{form};
List<UIMenuItem> menuItems = new ArrayList<UIMenuItem>();
PreviewProvider[] previewProviders = supportPreview();
for (final PreviewProvider provider : previewProviders) {
UIMenuItem item = new UIMenuItem(provider.nameForPopupItem(), BaseUtils.readIcon(provider.iconPathForPopupItem()));
item.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
provider.onClick(JForm.this);
}
});
menuItems.add(item);
}
return menuItems.toArray(new UIMenuItem[menuItems.size()]);
}
/**
@ -917,6 +927,25 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
return creator.toData();
}
/**
* 支持的预览模式
* @return 预览模式
*/
@Override
public PreviewProvider[] supportPreview() {
return new PreviewProvider[]{new FormPreview(), new MobilePreview()};
}
/**
* 预览按钮点击事件
*
* @param provider 预览接口
*/
@Override
public void previewMenuActionPerformed(PreviewProvider provider) {
super.previewMenuActionPerformed(provider);
}
@Override
public String route() {
return ViewRequestConstants.FORM_VIEW_PATH;

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java

@ -193,7 +193,7 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane {
formDesigner.getSelectionModel().setSelectedCreator(xfl);
return true;
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return false;
}
}

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -201,7 +201,7 @@ public class FRFitLayoutDefinePane extends AbstractDataModify<WFitLayout> {
FormSelectionUtils.rebuildSelection(xWFitLayout, new Widget[]{wAbsoluteBodyLayout}));
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}

2
designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

@ -340,7 +340,7 @@ public class RichTextToolBar extends BasicPane{
try {
doc.insertString(start, content, attrs);
} catch (BadLocationException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}
}).setVisible(true);

2
designer-realize/src/main/java/com/fr/design/mainframe/CellWidgetPropertyPane.java

@ -183,7 +183,7 @@ public class CellWidgetPropertyPane extends BasicPane {
newWidget.setWidgetPrivilegeControl((WidgetPrivilegeControl) oldWidget.getWidgetPrivilegeControl().clone());
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return newWidget;
}

20
designer-realize/src/main/java/com/fr/design/mainframe/InformationCollector.java

@ -120,11 +120,11 @@ public class InformationCollector implements XMLReadable, XMLWriter {
}
xmlInputStream.close();
} catch (FileNotFoundException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
} catch (IOException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
} catch (XMLStreamException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}
@ -174,7 +174,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
try {
return content.toString().getBytes(EncodeConstants.ENCODING_UTF_8);
} catch (UnsupportedEncodingException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
return ArrayUtils.EMPTY_BYTE_ARRAY;
}
}
@ -225,7 +225,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
}
content = getFunctionsContentAsByte(rs);
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
} finally {
DBUtils.closeConnection(conn);
}
@ -258,7 +258,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
Delete delete = new Delete(table);
delete.execute(conn);
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
} finally {
DBUtils.closeConnection(conn);
}
@ -304,7 +304,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
try {
return content.toString().getBytes(EncodeConstants.ENCODING_UTF_8);
} catch (UnsupportedEncodingException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
return ArrayUtils.EMPTY_BYTE_ARRAY;
}
}
@ -356,7 +356,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
//读取XML的5分钟后开始发请求连接服务器.
Thread.sleep(SEND_DELAY);
} catch (InterruptedException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
sendFunctionsInfo();
sendUserInfo();
@ -402,7 +402,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
String encodeCotent = DesUtils.getEncString(fileContent);
writeEncodeContentToFile(encodeCotent, xmlFile);
}catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}
@ -418,7 +418,7 @@ public class InformationCollector implements XMLReadable, XMLWriter {
bw = new BufferedWriter(osw);
bw.write(fileContent);
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
} finally {
if(bw != null){
try {

3
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -53,6 +53,7 @@ import com.fr.design.menu.ToolBarDef;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.parameter.ParameterDefinitePane;
import com.fr.design.parameter.ParameterInputPane;
import com.fr.design.preview.MobilePreview;
import com.fr.design.preview.PagePreview;
import com.fr.design.preview.ViewPreview;
import com.fr.design.preview.WriteEnhancePreview;
@ -890,7 +891,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
public PreviewProvider[] supportPreview() {
Set<PreviewProvider> set = ExtraDesignClassManager.getInstance().getArray(PreviewProvider.MARK_STRING);
return ArrayUtils.addAll(new PreviewProvider[]{
new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview()
new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview(), new MobilePreview()
}, set.toArray(new PreviewProvider[set.size()]));
}

2
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/ActionModel.java

@ -58,7 +58,7 @@ public class ActionModel extends AlphaCellModel {
modelObject.put("className", getAction().getClass().getName()).put("searchCount", getSearchCount());
object.put("result", modelObject).put("cellType", getType().getTypeValue());
} catch (JSONException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return object;
}

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/DocumentModel.java

@ -62,9 +62,9 @@ public class DocumentModel extends AlphaCellModel {
try {
Desktop.getDesktop().browse(new URI(getDocumentUrl()));
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} catch (URISyntaxException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}

2
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/FileModel.java

@ -42,7 +42,7 @@ public class FileModel extends AlphaCellModel {
modelObject.put("filePath", getFilePath()).put("searchCount", getSearchCount());
object.put("result", modelObject).put("cellType", getType().getTypeValue());
} catch (JSONException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return object;
}

2
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/cell/model/PluginModel.java

@ -92,7 +92,7 @@ public class PluginModel extends AlphaCellModel {
modelObject.put("name", getName()).put("description", getContent()).put("pic", getImageUrl()).put("version", getVersion()).put("jartime", getJartime()).put("id", getId()).put("pluginid", getPluginId()).put("type", getType().getTypeValue()).put("price", getPrice()).put("link", getLink()).put("searchCount", getSearchCount());
object.put("result", modelObject).put("cellType", getType().getTypeValue());
} catch (JSONException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return object;

16
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -591,7 +591,7 @@ public class AlphaFineDialog extends UIDialog {
try {
form = FormIO.readForm(fileName);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return FormIO.exportFormAsImage(form);
}
@ -603,9 +603,9 @@ public class AlphaFineDialog extends UIDialog {
try {
rightSearchResultPane.add(new FilePreviewPane(get()));
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} catch (ExecutionException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
validate();
repaint();
@ -623,7 +623,7 @@ public class AlphaFineDialog extends UIDialog {
try {
workBook = (WorkBook) TemplateWorkBookIO.readTemplateWorkBook(fileName);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
BufferedImage bufferedImage = new ImageExporter().exportToImage(workBook);
return bufferedImage;
@ -638,9 +638,9 @@ public class AlphaFineDialog extends UIDialog {
validate();
repaint();
} catch (InterruptedException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} catch (ExecutionException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
@ -675,7 +675,7 @@ public class AlphaFineDialog extends UIDialog {
try {
bufferedImage = ImageIO.read(getClass().getResource("/com/fr/design/mainframe/alphafine/images/default_product.png"));
} catch (IOException e1) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
return bufferedImage;
@ -962,7 +962,7 @@ public class AlphaFineDialog extends UIDialog {
try {
object.put("uuid", uuid).put("activityKey", activityKey).put("username", username).put("createTime", createTime).put("key", key).put("resultKind", resultKind).put("resultValue", resultValue);
} catch (JSONException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
final HashMap<String, String> para = new HashMap<>();
String date = new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime());

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

@ -109,7 +109,7 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
directory = FSDirectory.open(new File(path));
indexWriter = new IndexWriter(directory, config);
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
@ -123,7 +123,7 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
indexReader = DirectoryReader.open(directory);
indexSearcher = new IndexSearcher(indexReader);
} catch (IOException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}

2
designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSDialog.java

@ -63,7 +63,7 @@ public class BBSDialog extends UIDialog {
}
});
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}

4
designer-realize/src/main/java/com/fr/design/mainframe/bbs/BBSLoginDialog.java

@ -281,7 +281,7 @@ public class BBSLoginDialog extends UIDialog {
username = URLEncoder.encode(username, EncodeConstants.ENCODING_GBK);
password = URLEncoder.encode(password, EncodeConstants.ENCODING_GBK);
} catch (UnsupportedEncodingException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
String url = CloudCenter.getInstance().acquireUrlByKind("bbs.login") + "&username=" + username + "&password=" + password;
String loginSuccessFlag = CloudCenter.getInstance().acquireUrlByKind("bbs");
@ -294,7 +294,7 @@ public class BBSLoginDialog extends UIDialog {
return true;
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
}
}

4
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -149,7 +149,7 @@ public class UserInfoLabel extends UILabel {
}
Thread.sleep(DELAY_TIME);
} catch (InterruptedException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
HttpClient hc = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("bbs.popup"));
if (!hc.isServerAlive()) {
@ -222,7 +222,7 @@ public class UserInfoLabel extends UILabel {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}

4
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -142,7 +142,7 @@ public class UserInfoPane extends BasicPane {
return dayNew - dayOld;
}
} catch (ParseException e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return 1;
}
@ -165,7 +165,7 @@ public class UserInfoPane extends BasicPane {
}
} catch (InterruptedException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
String userName = MarketConfig.getInstance().getBbsUsername();

2
designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java

@ -134,7 +134,7 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
this.elementCasePane.paintComponents(g);
}catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
return image;

2
designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java

@ -234,7 +234,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
parameterUI = StableFactory.getMarkedInstanceObjectFromClass(ParameterUI.FORM_XML_TAG, ParameterUI.class);
parameterUI.setDefaultSize();
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}

2
designer-realize/src/main/java/com/fr/design/present/CellWriteAttrPane.java

@ -111,7 +111,7 @@ public class CellWriteAttrPane extends BasicPane {
newWidget.setWidgetPrivilegeControl((WidgetPrivilegeControl) oldWidget.getWidgetPrivilegeControl().clone());
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return newWidget;
}

2
designer-realize/src/main/java/com/fr/design/report/RichTextEditingPane.java

@ -150,7 +150,7 @@ public class RichTextEditingPane extends UITextPane{
doc.remove(formulaStart, formulaContent.length() + WRAPPER_LEN);
doc.insertString(formulaStart, content, attrs);
} catch (BadLocationException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}
}).setVisible(true);

4
designer-realize/src/main/java/com/fr/design/report/RichTextPane.java

@ -164,7 +164,7 @@ public class RichTextPane extends BasicPane {
lastChar = new RichChar(charStr, style);
richText.addContent(lastChar);
}catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}
}
@ -214,7 +214,7 @@ public class RichTextPane extends BasicPane {
doc.insertString(doc.getLength(), charStr, attrs);
toolBar.addInputListener();
} catch (BadLocationException e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
}
}

2
designer-realize/src/main/java/com/fr/design/report/share/ConfusionTableDataPane.java

@ -193,7 +193,7 @@ public class ConfusionTableDataPane extends BasicBeanPane<ConfusionInfo>{
InputStream in = IOUtils.readResource("/com/fr/design/report/share/shareToolTip.html");
return IOUtils.inputStream2String(in);
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
return StringUtils.EMPTY;

2
designer-realize/src/main/java/com/fr/design/write/submit/SubmitVisitorListPane.java

@ -137,7 +137,7 @@ public class SubmitVisitorListPane extends ObjectJControlPane {
try {
editing = (BuiltInSQLSubmiterProvider) editing.clone();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
editing.setDBManipulation(dbManipulation);

2
designer-realize/src/main/java/com/fr/start/Designer.java

@ -180,7 +180,7 @@ public class Designer extends BaseDesigner {
shortCuts.add((ShortCut) DesignModuleFactory.getNewFormAction().newInstance());
}
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage());
FRContext.getLogger().error(e.getMessage(), e);
}
return shortCuts.toArray(new ShortCut[shortCuts.size()]);
}

9
designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java

@ -10,6 +10,7 @@ import com.fr.record.analyzer.Metrics;
import com.fr.start.Designer;
import com.fr.start.ServerStarter;
import com.fr.start.SplashContext;
import com.fr.start.server.FineEmbedServer;
import com.fr.startup.activators.BasicActivator;
import com.fr.workspace.Workspace;
import com.fr.workspace.WorkspaceEvent;
@ -39,7 +40,13 @@ public class DesignerStartup extends Activator {
startSub(EnvBasedModule.class);
//designer模块启动好后,查看demo
browserDemo();
ExecutorService service = Executors.newSingleThreadExecutor();
ExecutorService service = Executors.newFixedThreadPool(2);
service.submit(new Runnable() {
@Override
public void run() {
FineEmbedServer.start();
}
});
service.submit(new Runnable() {
@Override

Loading…
Cancel
Save