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 ed67299f6d..3e2b30fee2 100644
--- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
+++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
@@ -146,7 +146,7 @@ public class EnvChangeEntrance {
template.refreshToolArea();
}
showServiceDialog(selectedEnv);
- pluginErrorRemind(selectedEnv);
+ pluginErrorRemind();
} catch (WorkspaceAuthException | RegistEditionException e) {
// String title = Toolkit.i18nText("Fine-Design_Basic_Remote_Connect_Auth_Failed");
// String title = Toolkit.i18nText("Fine-Design_Basic_Lic_Does_Not_Support_Remote");
@@ -302,10 +302,9 @@ public class EnvChangeEntrance {
/**
* 插件启动错误信息提示
- * @param selectedEnv 选择的工作环境
*/
- public void pluginErrorRemind(DesignerWorkspaceInfo selectedEnv) {
- if (selectedEnv.getType() == DesignerWorkspaceType.Remote) {
+ public void pluginErrorRemind() {
+ if (!WorkContext.getCurrent().isLocal()) {
return;
}
diff --git a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
index 66a77e1c2d..8827d6a857 100644
--- a/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
+++ b/designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
@@ -99,7 +99,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
public enum PropertyMode {
REPORT, // 报表
- REPORT_PARA, // 报表参数面板
+ REPORT_PARA_WIDGET, //报表参数面板中的控件
+ REPORT_PARA(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings")), // 报表参数面板
REPORT_FLOAT, // 报表悬浮元素
FORM(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings")), // 表单
FORM_REPORT, // 表单报表块
@@ -272,27 +273,27 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
propertyItemMap = new LinkedHashMap<>(); // 有序map
// 单元格元素
PropertyItem cellElement = new PropertyItem(KEY_CELL_ELEMENT, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell_Element"),
- "cellelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
+ "cellelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 单元格属性
PropertyItem cellAttr = new PropertyItem(KEY_CELL_ATTR, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell_Attributes"),
- "cellattr", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
+ "cellattr", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 悬浮元素
PropertyItem floatElement = new PropertyItem(KEY_FLOAT_ELEMENT, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Float_Element"),
- "floatelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
+ "floatelement", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.POLY_REPORT});
// 控件设置
PropertyItem widgetSettings = new PropertyItem(KEY_WIDGET_SETTINGS, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Component_Settings"),
- "widgetsettings", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY},
- new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.FORM, PropertyMode.POLY_REPORT, PropertyMode.POLY_CHART});
+ "widgetsettings", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.FORM, PropertyMode.POLY},
+ new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.FORM, PropertyMode.POLY_REPORT, PropertyMode.POLY_CHART});
// 条件属性
PropertyItem conditionAttr = new PropertyItem(KEY_CONDITION_ATTR, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Condition_Attributes"),
- "conditionattr", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
+ "conditionattr", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 超级链接
PropertyItem hyperlink = new PropertyItem(KEY_HYPERLINK, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Hyperlink"),
- "hyperlink", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
+ "hyperlink", new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_PARA, PropertyMode.REPORT_PARA_WIDGET, PropertyMode.REPORT_FLOAT, PropertyMode.POLY, PropertyMode.POLY_CHART},
new PropertyMode[]{PropertyMode.REPORT, PropertyMode.REPORT_FLOAT, PropertyMode.FORM_REPORT, PropertyMode.POLY_REPORT});
// 组件库
PropertyItem widgetLib = new PropertyItem(KEY_WIDGET_LIB, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Library"),
diff --git a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileParamSettingPane.java b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileParamSettingPane.java
index d2a358c192..7f1d270af5 100644
--- a/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileParamSettingPane.java
+++ b/designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileParamSettingPane.java
@@ -12,6 +12,7 @@ import com.fr.form.ui.mobile.MobileParamStyle;
import com.fr.general.ComparatorUtils;
import com.fr.report.ExtraReportClassManager;
import com.fr.report.fun.MobileParamStyleProvider;
+import com.fr.report.mobile.EmptyMobileParamStyle;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
@@ -103,7 +104,10 @@ public class MobileParamSettingPane extends BasicPane {
if (ComparatorUtils.equals(mobileParamStyle.disPlayName(), provider.displayName())) {
String displayName = provider.displayName();
paramStyleList.setSelectedIndex(i);
- map.get(displayName).populateBean(mobileParamStyle);
+ // 如果是兼容空类型 无须填充面板
+ if (!(mobileParamStyle instanceof EmptyMobileParamStyle)) {
+ map.get(displayName).populateBean(mobileParamStyle);
+ }
card.show(right, displayName);
return;
}
diff --git a/designer-base/src/main/java/com/fr/env/PluginErrorRemindDialog.java b/designer-base/src/main/java/com/fr/env/PluginErrorRemindDialog.java
index 3654cca2d9..42dae0fa19 100644
--- a/designer-base/src/main/java/com/fr/env/PluginErrorRemindDialog.java
+++ b/designer-base/src/main/java/com/fr/env/PluginErrorRemindDialog.java
@@ -6,7 +6,6 @@ import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
-import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import javax.swing.BorderFactory;
@@ -14,52 +13,65 @@ import javax.swing.Icon;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
-import javax.swing.JTextArea;
+import javax.swing.JTextPane;
+import javax.swing.text.SimpleAttributeSet;
+import javax.swing.text.StyleConstants;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Frame;
+import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-import java.util.Locale;
/**
* 插件启动失败提示窗
*/
public class PluginErrorRemindDialog extends JDialog implements ActionListener {
- public PluginErrorRemindDialog(Frame parent, String areaText) {
+ private static final String SIM_HEI = "SimHei";
+
+ public PluginErrorRemindDialog(Frame parent, String text) {
super(parent, true);
//上面的标签面板
JPanel topPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel imagePanel = new JPanel();
- Icon icon = IOUtils.readIcon("com/fr/design/images/warnings/warning5.png");
+ Icon icon = IOUtils.readIcon("com/fr/design/images/warnings/icon_WarningIcon_normal.png");
JLabel imageLabel = new JLabel();
imageLabel.setIcon(icon);
imagePanel.add(imageLabel);
- imagePanel.setPreferredSize(new Dimension(130, 100));
+ imagePanel.setPreferredSize(new Dimension(48, 48));
JPanel verticalPanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
JLabel label = new JLabel(Toolkit.i18nText("Fine-Design_Plugin_Error_Remind_Title"));
- label.setFont(FRFont.getInstance().applySize(18).applyStyle(1));
- label.setPreferredSize(new Dimension(650, 100));
+ label.setFont(FRFont.getInstance().applySize(16).applyName(SIM_HEI));
+ label.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20));
verticalPanel.add(label);
topPanel.add(imagePanel, BorderLayout.WEST);
topPanel.add(verticalPanel, BorderLayout.CENTER);
- topPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
+ topPanel.setPreferredSize(new Dimension(600, 73));
+ topPanel.setBorder(BorderFactory.createEmptyBorder(10, 20, 0, 20));
//中间的文本域面板
JPanel centerPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
- centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
- centerPanel.setPreferredSize(new Dimension(480, 320));
+ centerPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
+ centerPanel.setPreferredSize(new Dimension(580, 269));
+
+ JTextPane textPane = new JTextPane();
+
+ SimpleAttributeSet attributeSet = new SimpleAttributeSet();
+ StyleConstants.setFontFamily(attributeSet, SIM_HEI);
+ StyleConstants.setLineSpacing(attributeSet, 0.5f);
+ textPane.setParagraphAttributes(attributeSet, true);
- JTextArea checkArea = new JTextArea(areaText);
- checkArea.setEnabled(false);
- centerPanel.add(checkArea, BorderLayout.CENTER);
+ textPane.setEditable(false);
+ textPane.setMargin(new Insets(10, 10, 10, 10));
+ textPane.setText(text);
+ centerPanel.add(textPane, BorderLayout.CENTER);
UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Plugin_Error_Remind_Not_Deal_With"));
UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Plugin_Error_Remind_Deal_With"));
@@ -69,7 +81,7 @@ public class PluginErrorRemindDialog extends JDialog implements ActionListener {
// 按钮
JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
- buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
+ buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
buttonPanel.add(cancelButton);
buttonPanel.add(okButton);
@@ -80,7 +92,7 @@ public class PluginErrorRemindDialog extends JDialog implements ActionListener {
this.add(topPanel, BorderLayout.NORTH);
this.add(centerPanel, BorderLayout.CENTER);
this.add(buttonPanel, BorderLayout.SOUTH);
- this.setSize(new Dimension(GeneralContext.getLocale().equals(Locale.US) ? 750 : 600, 500));
+ this.setSize(new Dimension(600, 400));
GUICoreUtils.centerWindow(this);
}
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/new_folder_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/new_folder_disabled.svg
new file mode 100644
index 0000000000..f3936e1539
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/new_folder_disabled.svg
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/new_folder_normal.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/new_folder_normal.svg
new file mode 100644
index 0000000000..85f41e26a7
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/new_folder_normal.svg
@@ -0,0 +1,8 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/refresh_normal.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/refresh_normal.svg
new file mode 100644
index 0000000000..4e3fd9c147
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/refresh_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/remove_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/remove_disabled.svg
new file mode 100644
index 0000000000..1245fbd4e3
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/remove_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/remove_normal.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/remove_normal.svg
new file mode 100644
index 0000000000..69a3011faf
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/remove_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/rename_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/rename_disabled.svg
new file mode 100644
index 0000000000..953e12eaa9
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/rename_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/rename_normal.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/rename_normal.svg
new file mode 100644
index 0000000000..a2c287789d
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/rename_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/vcs_list_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/vcs_list_disabled.svg
new file mode 100644
index 0000000000..b88ee0998e
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/vcs_list_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/vcs_list_normal.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/vcs_list_normal.svg
new file mode 100644
index 0000000000..ebfca43899
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/vcs_list_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/view_folder_disabled.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/view_folder_disabled.svg
new file mode 100644
index 0000000000..376d372d41
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/view_folder_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/view_folder_normal.svg b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/view_folder_normal.svg
new file mode 100644
index 0000000000..42ae6cbd3d
--- /dev/null
+++ b/designer-base/src/main/resources/com/fr/design/images/FileDealerPaneIcon/view_folder_normal.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/designer-base/src/main/resources/com/fr/design/images/warnings/icon_WarningIcon_normal.png b/designer-base/src/main/resources/com/fr/design/images/warnings/icon_WarningIcon_normal.png
new file mode 100644
index 0000000000..37dbe939b6
Binary files /dev/null and b/designer-base/src/main/resources/com/fr/design/images/warnings/icon_WarningIcon_normal.png differ
diff --git a/designer-base/src/main/resources/com/fr/design/images/warnings/icon_WarningIcon_normal@2x.png b/designer-base/src/main/resources/com/fr/design/images/warnings/icon_WarningIcon_normal@2x.png
new file mode 100644
index 0000000000..756a456566
Binary files /dev/null and b/designer-base/src/main/resources/com/fr/design/images/warnings/icon_WarningIcon_normal@2x.png differ
diff --git a/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java b/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java
index 7f53d05ded..6a78fe0c63 100644
--- a/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java
+++ b/designer-base/src/test/java/com/fr/design/EnvChangeEntranceTest.java
@@ -8,6 +8,8 @@ import com.fr.design.env.RemoteDesignerWorkspaceInfo;
import com.fr.env.CheckServiceDialog;
import com.fr.env.PluginErrorRemindDialog;
import com.fr.invoke.Reflect;
+import com.fr.workspace.WorkContext;
+import com.fr.workspace.Workspace;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
import com.fr.workspace.engine.channel.http.FunctionalHttpRequest;
import org.easymock.EasyMock;
@@ -30,7 +32,8 @@ import java.awt.Frame;
EnvChangeEntrance.class,
CheckServiceDialog.class,
DesignerEnvManager.class,
- PluginErrorRemindHandler.class})
+ PluginErrorRemindHandler.class,
+ WorkContext.class})
public class EnvChangeEntranceTest {
@Test
@@ -107,12 +110,15 @@ public class EnvChangeEntranceTest {
}
@Test
- public void testPluginErrorRemind() throws Exception {
+ public void testPluginErrorRemind() {
try {
- DesignerWorkspaceInfo selectedEnv = EasyMock.mock(DesignerWorkspaceInfo.class);
- EasyMock.expect(selectedEnv.getType()).andReturn(DesignerWorkspaceType.Remote).once();
- EasyMock.expect(selectedEnv.getType()).andReturn(DesignerWorkspaceType.Local).times(2);
+
+ Workspace workspace = EasyMock.mock(Workspace.class);
+ EasyMock.expect(workspace.isLocal()).andReturn(false).once();
+ EasyMock.expect(workspace.isLocal()).andReturn(true).times(2);
+ PowerMock.mockStatic(WorkContext.class);
+ EasyMock.expect(WorkContext.getCurrent()).andReturn(workspace).anyTimes();
PowerMock.mockStatic(PluginErrorRemindHandler.class);
EasyMock.expect(PluginErrorRemindHandler.pluginErrorContent()).andReturn("").once();
@@ -124,17 +130,17 @@ public class EnvChangeEntranceTest {
dialog.setVisible(true);
EasyMock.expectLastCall();
- EasyMock.replay(selectedEnv, dialog);
+ EasyMock.replay(workspace, dialog);
PowerMock.replayAll();
EnvChangeEntrance entrance = EnvChangeEntrance.getInstance();
- entrance.pluginErrorRemind(selectedEnv);
- entrance.pluginErrorRemind(selectedEnv);
- entrance.pluginErrorRemind(selectedEnv);
+ entrance.pluginErrorRemind();
+ entrance.pluginErrorRemind();
+ entrance.pluginErrorRemind();
- EasyMock.verify(selectedEnv, dialog);
+ EasyMock.verify(workspace, dialog);
PowerMock.verifyAll();
} catch (Exception e) {
Assert.fail();
diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/WidgetBasicPropertyPaneFactory.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/WidgetBasicPropertyPaneFactory.java
index db98069094..a3a34a0619 100644
--- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/WidgetBasicPropertyPaneFactory.java
+++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/WidgetBasicPropertyPaneFactory.java
@@ -1,21 +1,37 @@
package com.fr.design.mainframe.widget.ui;
import com.fr.design.designer.creator.XCreator;
+import com.fr.design.designer.creator.XWParameterLayout;
+import com.fr.design.file.HistoryTemplateListCache;
+import com.fr.design.mainframe.EastRegionContainerPane;
+import com.fr.design.mainframe.JForm;
/**
* Created by kerry on 2017/9/30.
*/
public class WidgetBasicPropertyPaneFactory {
- public static FormBasicPropertyPane createBasicPropertyPane(XCreator xCreator){
- if(xCreator.supportSetVisible() && xCreator.supportSetEnable()){
+ public static FormBasicPropertyPane createBasicPropertyPane(XCreator xCreator) {
+ freshPropertyMode(xCreator);
+ if (xCreator.supportSetVisible() && xCreator.supportSetEnable()) {
return new FormBasicWidgetPropertyPane();
}
- if(xCreator.supportSetVisible()){
+ if (xCreator.supportSetVisible()) {
return new BasicSetVisiblePropertyPane();
- }else{
+ } else {
return new FormBasicPropertyPane();
}
}
+
+ private static void freshPropertyMode(XCreator xCreator) {
+ if (!(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() instanceof JForm)) {
+ if (xCreator instanceof XWParameterLayout) {
+ EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA);
+ } else {
+ EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_PARA_WIDGET);
+ }
+ }
+ }
+
}
diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java
index 14bb23b18d..a7ef4f108a 100644
--- a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java
+++ b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceProvider.java
@@ -71,7 +71,6 @@ public class DesignerWorkspaceProvider extends Activator {
} catch (Exception e) {
FineLoggerFactory.getLogger().warn("Check Service Failed");
}
- EnvChangeEntrance.getInstance().pluginErrorRemind(selectEnv);
}
});
}
@@ -88,6 +87,16 @@ public class DesignerWorkspaceProvider extends Activator {
EnvChangeEntrance.getInstance().dealEvnExceptionWhenStartDesigner();
}
}
+ pluginErrorRemind();
+ }
+
+ private void pluginErrorRemind() {
+ EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener() {
+ @Override
+ public void on(Event event, Null aNull) {
+ EnvChangeEntrance.getInstance().pluginErrorRemind();
+ }
+ });
}
@Override
diff --git a/designer-realize/src/test/java/com/fr/start/module/DesignerWorkspaceProviderTest.java b/designer-realize/src/test/java/com/fr/start/module/DesignerWorkspaceProviderTest.java
new file mode 100644
index 0000000000..d058ee8de9
--- /dev/null
+++ b/designer-realize/src/test/java/com/fr/start/module/DesignerWorkspaceProviderTest.java
@@ -0,0 +1,50 @@
+package com.fr.start.module;
+
+import com.fr.design.constants.DesignerLaunchStatus;
+import com.fr.event.EventDispatcher;
+import com.fr.invoke.Reflect;
+import com.fr.workspace.WorkContext;
+import com.fr.workspace.Workspace;
+import org.easymock.EasyMock;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.powermock.api.easymock.PowerMock;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+/**
+ * @author Lucian.Chen
+ * @version 10.0
+ * Created by Lucian.Chen on 2021/1/7
+ */
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({WorkContext.class})
+public class DesignerWorkspaceProviderTest {
+
+ @Test
+ public void testPluginErrorRemind() {
+
+ try {
+ Workspace workspace = EasyMock.mock(Workspace.class);
+ EasyMock.expect(workspace.isLocal()).andReturn(false).once();
+ PowerMock.mockStatic(WorkContext.class);
+ EasyMock.expect(WorkContext.getCurrent()).andReturn(workspace).anyTimes();
+
+ EasyMock.replay(workspace);
+ PowerMock.replayAll();
+
+ DesignerWorkspaceProvider provider = new DesignerWorkspaceProvider();
+ Reflect.on(provider).call("pluginErrorRemind");
+ EventDispatcher.fire(DesignerLaunchStatus.STARTUP_COMPLETE);
+
+ EasyMock.verify(workspace);
+ PowerMock.verifyAll();
+
+ } catch (Exception e) {
+ Assert.fail(e.getMessage());
+ }
+
+
+ }
+}