From d62e1c4160a0915641338f310f1bfc86f0e7b3f1 Mon Sep 17 00:00:00 2001 From: obo Date: Wed, 20 Dec 2023 20:59:18 +0800 Subject: [PATCH 01/14] =?UTF-8?q?REPORT-111566=20=E3=80=90=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E6=98=BE=E7=A4=BA=E5=A2=9E=E5=BC=BA=E3=80=91=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E9=9D=A2=E6=9D=BF=E8=A7=86=E8=A7=89=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/widgettheme/theme/panel/WidgetTextStylePane.java | 4 +++- .../java/com/fr/design/widgettheme/BaseStyleSettingPane.java | 2 +- .../src/main/java/com/fr/design/webattr/EditToolBar.java | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java b/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java index 896b33c282..6b45d5e6f3 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java @@ -5,6 +5,7 @@ import com.fr.design.gui.frpane.FontSizeComboPane; import com.fr.widgettheme.theme.widget.style.ThemeTextStyle; import javax.swing.BorderFactory; +import javax.swing.Box; import javax.swing.JPanel; import java.awt.Color; import java.awt.Dimension; @@ -30,12 +31,13 @@ public class WidgetTextStylePane extends JPanel { } public WidgetTextStylePane(Vector fontSizes, int preferredWidth) { - this.setLayout(new FlowLayout(FlowLayout.LEFT)); + this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); this.setBorder(BorderFactory.createEmptyBorder()); fontSizePane = new FontSizeComboPane(fontSizes); fontColorButton = new UIColorButton(); fontSizePane.setPreferredSize(new Dimension(preferredWidth, fontSizePane.getPreferredSize().height)); this.add(fontSizePane); + add(Box.createHorizontalStrut(5)); this.add(fontColorButton); } diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java index 06c3f24880..f5c18f389d 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java @@ -94,7 +94,7 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa borderRadiusSpinner = new UIBoundSpinner(0, Integer.MAX_VALUE, 1); frFontPane = new FRFontPane(); buttonStyleDefinedPane = new ButtonStyleDefinedPane(); - textStylePane = new WidgetTextStylePane(100); + textStylePane = new WidgetTextStylePane(105); selectBgColorBox = new NewColorSelectBox(160, true); paneMap.put(StyleSetting.STYLE_TYPE, createStyleTypePane()); paneMap.put(StyleSetting.THEME_COLOR, colorSelectBox); diff --git a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java index 216e82cff0..36222f19c9 100644 --- a/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java +++ b/designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java @@ -182,7 +182,7 @@ public class EditToolBar extends BasicPane { if(WidgetThemeDesignerUtils.enableWidgetEnhance()) { backgroundPane.add(createButtonColorGroup()); } - backgroundPane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Background"))); + backgroundPane.setBorder(BorderFactory.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_ToolBar_Style_Setting"))); this.add(backgroundPane, BorderLayout.SOUTH); } From 8940716dcb79e656a5beacd51b58eb4c6931a858 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Thu, 21 Dec 2023 15:13:12 +0800 Subject: [PATCH 02/14] =?UTF-8?q?REPORT-109525=20=E3=80=90=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E6=80=A7=E8=83=BD=E3=80=91=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96=20=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=A6=81=E7=94=A8=E5=90=AF=E7=94=A8=E9=80=BB=E8=BE=91=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/extra/PluginOperateUtils.java | 2 +- .../src/main/java/com/fr/design/extra/PluginUtils.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java b/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java index d2f1bcc3c2..e7e6845772 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java @@ -153,7 +153,7 @@ public class PluginOperateUtils { public void run() { PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo); PluginContext plugin = PluginManager.getContext(pluginMarker); - boolean isRunning = plugin.isRunning(); + boolean isRunning = plugin.isRunning() || plugin.isPrepare(); PluginTaskCallback modifyStatusCallback = new ModifyStatusCallback(isRunning, jsCallback); changePluginActive(isRunning, pluginMarker, modifyStatusCallback, plugin); } diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java b/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java index f12f8f8446..85dc24afde 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java @@ -270,8 +270,8 @@ public class PluginUtils { jo.put("vendor", pluginContext.getVendor()); jo.put("price", pluginContext.getPrice()); jo.put("requiredJarTime", pluginContext.getRequiredJarTime()); - // 前端需求的active实际上是插件的运行状态,通过isRunning()获取 - jo.put("active", pluginContext.isRunning()); + // 前端需求的active实际上是插件的运行状态,通过isRunning()或isPrepare()获取 + jo.put("active", pluginContext.isRunning() || pluginContext.isPrepare()); jo.put("hidden", pluginContext.isHidden()); jo.put("free", pluginContext.isFree()); jo.put("licDamaged", pluginContext.isLicDamaged()); From 4e51294812ca53b2cc3c8fcfc4bc35200c4f0305 Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" Date: Thu, 21 Dec 2023 17:07:39 +0800 Subject: [PATCH 03/14] =?UTF-8?q?REPORT-111169=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E5=90=AB=E6=9C=89=E6=B3=A8=E9=87=8A=E7=9A=84=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E4=BD=86=E5=8F=82=E6=95=B0=E4=BE=9D=E7=84=B6?= =?UTF-8?q?=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/data/tabledata/tabledatapane/DBTableDataPane.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index d0ffd7f22c..ed2417449c 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -417,8 +417,8 @@ public class DBTableDataPane extends AbstractTableDataPane implemen private void checkParameter() { String[] paramTexts = new String[2]; - paramTexts[0] = this.sqlTextPane.getText(); - paramTexts[1] = this.pageQuery; + paramTexts[0] = SqlUtils.clearSqlComments(this.sqlTextPane.getText()); + paramTexts[1] = SqlUtils.clearSqlComments(this.pageQuery); Parameter[] parameters = ParameterHelper.analyze4Parameters(paramTexts, false); if (parameters.length < 1 && this.editorPane.update().size() < 1) { From 3a1ec90a214e62664a2c709e9d825cf51ed17c26 Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 21 Dec 2023 19:35:37 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E8=A7=86=E8=A7=89=E4=BC=98=E5=8C=96=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BA=86=E4=B8=BB=E9=A2=98=E9=9D=A2=E6=9D=BF=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=EF=BC=8C=E5=8F=AF=E4=BB=A5=E6=A0=B9=E6=8D=AE=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E8=87=AA=E9=80=82=E5=BA=94=E5=AE=BD=E9=AB=98=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=86=99=E6=AD=BB=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/DesktopWidgetStyleEditPane.java | 12 +++- .../widget/MobileWidgetStyleEditPane.java | 15 ++-- .../theme/panel/WidgetTextStylePane.java | 72 ------------------- .../util/ThemeTextStylePaneCreator.java | 40 +++++++++++ .../widgettheme/BaseStyleSettingPane.java | 34 ++++++--- .../widgettheme/ParaButtonSettingPane.java | 11 ++- .../widgettheme/ParaEditorSettingPane.java | 11 ++- .../ParaTreeEditorSettingPane.java | 12 ++-- 8 files changed, 107 insertions(+), 100 deletions(-) delete mode 100644 designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java create mode 100644 designer-base/src/main/java/com/fr/widgettheme/util/ThemeTextStylePaneCreator.java diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java index 7cfebf316a..aca4b690de 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/DesktopWidgetStyleEditPane.java @@ -5,12 +5,14 @@ import com.fr.base.theme.TemplateTheme; import com.fr.design.style.color.NewColorSelectBox; import com.fr.widgettheme.theme.widget.style.BorderStyle; import com.fr.widgettheme.theme.widget.style.ButtonBackgroundStyle; +import com.fr.widgettheme.theme.widget.style.ThemeTextStyle; import com.fr.widgettheme.theme.widget.style.ThemedWidgetStyle; import com.fr.design.gui.ibutton.UIRadioButton; import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants; +import com.fr.widgettheme.util.ThemeTextStylePaneCreator; import javax.swing.ButtonGroup; import javax.swing.JPanel; @@ -52,7 +54,7 @@ public class DesktopWidgetStyleEditPane extends WidgetS new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Style")), stylePane}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Line")), lineComboBox}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner}, - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), textStylePane}, + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), ThemeTextStylePaneCreator.create(fontSizePane, fontColorButton)}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Background_Select_Box")), selectBackgroundColorBox} }; } @@ -86,7 +88,8 @@ public class DesktopWidgetStyleEditPane extends WidgetS colorSelectBox.setSelectObject(style.getThemeColor()); lineComboBox.setSelectedLineStyle(style.getBorderStyle().getLineType()); borderRadiusSpinner.setValue(style.getBorderStyle().getRadius()); - textStylePane.setTextStyle(style.getTextStyle()); + fontSizePane.setValue(style.getTextStyle().getFontSize()); + fontColorButton.setColor(style.getTextStyle().getFontColor()); selectBackgroundColorBox.setSelectObject(style.getSelectBackgroundColor()); } @@ -102,7 +105,10 @@ public class DesktopWidgetStyleEditPane extends WidgetS borderStyle.setLineType(lineComboBox.getSelectedLineStyle()); borderStyle.setRadius((int) borderRadiusSpinner.getValue()); style.setBorderStyle(borderStyle); - style.setTextStyle(textStylePane.getTextStyle()); + ThemeTextStyle textStyle = new ThemeTextStyle(); + textStyle.setFontSize(fontSizePane.getValue()); + textStyle.setFontColor(fontColorButton.getColor()); + style.setTextStyle(textStyle); ButtonBackgroundStyle buttonBackgroundStyle = new ButtonBackgroundStyle(); ColorBackground buttonBackground = ColorBackground.getInstance(style.getThemeColor()); buttonBackgroundStyle.setInitialBackground(buttonBackground); diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/MobileWidgetStyleEditPane.java b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/MobileWidgetStyleEditPane.java index 228dce7b26..ec6ef9aebb 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/MobileWidgetStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/MobileWidgetStyleEditPane.java @@ -1,10 +1,11 @@ package com.fr.widgettheme.theme.edit.widget; import com.fr.base.theme.TemplateTheme; -import com.fr.widgettheme.theme.panel.WidgetTextStylePane; +import com.fr.design.gui.frpane.FontSizeComboPane; import com.fr.widgettheme.theme.widget.style.BorderStyle; import com.fr.widgettheme.theme.widget.style.MobileThemedWidgetStyle; import com.fr.design.gui.icombobox.LineComboBox; +import com.fr.widgettheme.theme.widget.style.ThemeTextStyle; import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants; import java.util.Arrays; @@ -38,8 +39,8 @@ public class MobileWidgetStyleEditPane extends WidgetSt } @Override - protected void initTextStylePane() { - textStylePane = new WidgetTextStylePane(FONT_SIZES, 140); + protected void initFontSizePane() { + fontSizePane = new FontSizeComboPane(FONT_SIZES); } @Override @@ -52,7 +53,8 @@ public class MobileWidgetStyleEditPane extends WidgetSt colorSelectBox.setSelectObject(style.getThemeColor()); lineComboBox.setSelectedLineStyle(style.getBorderStyle().getLineType()); borderRadiusSpinner.setValue(style.getBorderStyle().getRadius()); - textStylePane.setTextStyle(style.getTextStyle()); + fontSizePane.setValue(style.getTextStyle().getFontSize()); + fontColorButton.setColor(style.getTextStyle().getFontColor()); } @Override @@ -67,7 +69,10 @@ public class MobileWidgetStyleEditPane extends WidgetSt borderStyle.setLineType(lineComboBox.getSelectedLineStyle()); borderStyle.setRadius((int) borderRadiusSpinner.getValue()); style.setBorderStyle(borderStyle); - style.setTextStyle(textStylePane.getTextStyle()); + ThemeTextStyle textStyle = new ThemeTextStyle(); + textStyle.setFontSize(fontSizePane.getValue()); + textStyle.setFontColor(fontColorButton.getColor()); + style.setTextStyle(textStyle); } } \ No newline at end of file diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java b/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java deleted file mode 100644 index 6b45d5e6f3..0000000000 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/panel/WidgetTextStylePane.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.fr.widgettheme.theme.panel; - -import com.fr.design.gui.ibutton.UIColorButton; -import com.fr.design.gui.frpane.FontSizeComboPane; -import com.fr.widgettheme.theme.widget.style.ThemeTextStyle; - -import javax.swing.BorderFactory; -import javax.swing.Box; -import javax.swing.JPanel; -import java.awt.Color; -import java.awt.Dimension; -import java.awt.FlowLayout; -import java.util.Vector; - -/** - * 控件文本样式配置面板 - * 包含文本字体大小和字体颜色 - * - * @author oBo - * @since 11.0 - * Created on 2023/12/13 - */ -public class WidgetTextStylePane extends JPanel { - - private final FontSizeComboPane fontSizePane; - - private final UIColorButton fontColorButton; - - public WidgetTextStylePane(int preferredWidth) { - this(null, preferredWidth); - } - - public WidgetTextStylePane(Vector fontSizes, int preferredWidth) { - this.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0)); - this.setBorder(BorderFactory.createEmptyBorder()); - fontSizePane = new FontSizeComboPane(fontSizes); - fontColorButton = new UIColorButton(); - fontSizePane.setPreferredSize(new Dimension(preferredWidth, fontSizePane.getPreferredSize().height)); - this.add(fontSizePane); - add(Box.createHorizontalStrut(5)); - this.add(fontColorButton); - } - - public void setTextStyle(ThemeTextStyle themeTextStyle) { - this.fontSizePane.setValue(themeTextStyle.getFontSize()); - this.fontColorButton.setColor(themeTextStyle.getFontColor()); - } - - public ThemeTextStyle getTextStyle() { - ThemeTextStyle themeTextStyle = new ThemeTextStyle(); - themeTextStyle.setFontSize(this.fontSizePane.getValue()); - themeTextStyle.setFontColor(this.fontColorButton.getColor()); - return themeTextStyle; - } - - public void setFontSizeValue(int fontSize) { - this.fontSizePane.setValue(fontSize); - } - - public void setFontColorValue(Color fontColor) { - this.fontColorButton.setColor(fontColor); - } - - public int getFontSizeValue() { - return this.fontSizePane.getValue(); - } - - public Color getFontColorValue() { - return this.fontColorButton.getColor(); - } - -} diff --git a/designer-base/src/main/java/com/fr/widgettheme/util/ThemeTextStylePaneCreator.java b/designer-base/src/main/java/com/fr/widgettheme/util/ThemeTextStylePaneCreator.java new file mode 100644 index 0000000000..34de319e9f --- /dev/null +++ b/designer-base/src/main/java/com/fr/widgettheme/util/ThemeTextStylePaneCreator.java @@ -0,0 +1,40 @@ +package com.fr.widgettheme.util; + +import com.fr.design.gui.frpane.FontSizeComboPane; +import com.fr.design.gui.ibutton.UIColorButton; +import com.fr.design.layout.TableLayout; +import com.fr.design.layout.TableLayoutHelper; + +import javax.swing.Box; +import javax.swing.JPanel; +import java.awt.Component; + +/** + * 样式设置pane抽象类 + * + * @author obo + * @since 11.0 + * Created on 2023/12/21 + */ +public class ThemeTextStylePaneCreator { + private ThemeTextStylePaneCreator() {} + + /** + * 创建主题文本样式配置面板 + * 包含字体大小下拉框和字体颜色按钮 + * 可以自适应布局 + * + * @param fontSizePane 字体大小配置 + * @param fontColorButton 字体颜色配置 + * @return 文本样式面板 + */ + public static JPanel create(FontSizeComboPane fontSizePane, UIColorButton fontColorButton) { + Component[][] components = {{fontSizePane, Box.createHorizontalStrut(5), fontColorButton}}; + double f = TableLayout.FILL; + double p = TableLayout.PREFERRED; + double[] rowSize = {f}; + double[] columnSize = {f, p, p}; + int[][] rowCount = {{1, 1, 1}}; + return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, 0, 0); + } +} diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java index f5c18f389d..b2de7d11f5 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java @@ -1,7 +1,8 @@ package com.fr.design.widgettheme; import com.fr.base.theme.TemplateTheme; -import com.fr.widgettheme.theme.panel.WidgetTextStylePane; +import com.fr.design.gui.frpane.FontSizeComboPane; +import com.fr.design.gui.ibutton.UIColorButton; import com.fr.widgettheme.theme.widget.style.BorderStyle; import com.fr.widgettheme.theme.widget.style.ThemeTextStyle; import com.fr.widgettheme.theme.widget.style.ThemedWidgetStyle; @@ -25,6 +26,7 @@ import com.fr.form.ui.Widget; import com.fr.general.FRFont; import com.fr.widgettheme.theme.panel.ButtonStyleDefinedPane; import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants; +import com.fr.widgettheme.util.ThemeTextStylePaneCreator; import javax.swing.BorderFactory; import javax.swing.ButtonGroup; @@ -63,12 +65,18 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa protected FRFontPane frFontPane; // 按钮背景设置 protected ButtonStyleDefinedPane buttonStyleDefinedPane; + + protected NewColorSelectBox selectBgColorBox; + /** - * 文本样式 - * 包含字体大小、字体颜色 + * 主题文本样式的字体大小 */ - protected WidgetTextStylePane textStylePane; - protected NewColorSelectBox selectBgColorBox; + protected FontSizeComboPane fontSizePane; + + /** + * 主题文本样式的字体颜色 + */ + protected UIColorButton fontColorButton; private final Map labelMap = new HashMap<>(); private final Map paneMap = new HashMap<>(); @@ -94,12 +102,13 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa borderRadiusSpinner = new UIBoundSpinner(0, Integer.MAX_VALUE, 1); frFontPane = new FRFontPane(); buttonStyleDefinedPane = new ButtonStyleDefinedPane(); - textStylePane = new WidgetTextStylePane(105); selectBgColorBox = new NewColorSelectBox(160, true); + fontSizePane = new FontSizeComboPane(); + fontColorButton = new UIColorButton(); paneMap.put(StyleSetting.STYLE_TYPE, createStyleTypePane()); paneMap.put(StyleSetting.THEME_COLOR, colorSelectBox); paneMap.put(StyleSetting.LINE_TYPE, lineComboBox); - paneMap.put(StyleSetting.TEXT_STYLE, textStylePane); + paneMap.put(StyleSetting.TEXT_STYLE, ThemeTextStylePaneCreator.create(fontSizePane, fontColorButton)); paneMap.put(StyleSetting.BORDER_RADIUS, borderRadiusSpinner); paneMap.put(StyleSetting.FONT, frFontPane); paneMap.put(StyleSetting.BTN_BACKGROUND, buttonStyleDefinedPane); @@ -242,7 +251,9 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa } private void setTextStylePane(ThemedWidgetStyle widgetStyle) { - this.textStylePane.setTextStyle(widgetStyle.getTextStyle()); + ThemeTextStyle textStyle = widgetStyle.getTextStyle(); + this.fontSizePane.setValue(textStyle.getFontSize()); + this.fontColorButton.setColor(textStyle.getFontColor()); } private void setFrFontPane() { @@ -269,8 +280,11 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa if (borderRadiusSpinner != null) { borderRadiusSpinner.setValue(BorderStyle.DEFAULT_BORDER_RADIUS); } - if (textStylePane != null) { - textStylePane.setTextStyle(new ThemeTextStyle()); + if (fontSizePane != null) { + fontSizePane.setValue(ThemeTextStyle.DEFAULT_FONT_SIZE); + } + if (fontColorButton != null) { + fontColorButton.setColor(ThemeTextStyle.DEFAULT_FONT_COLOR); } if (frFontPane != null) { frFontPane.populateBean(FRFont.getInstance()); diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java index 0ba714d8df..084e183abe 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/ParaButtonSettingPane.java @@ -2,6 +2,7 @@ package com.fr.design.widgettheme; import com.fr.design.widgettheme.common.ButtonSettingPane; import com.fr.form.ui.Widget; +import com.fr.widgettheme.theme.widget.style.ThemeTextStyle; import com.fr.widgettheme.theme.widget.theme.ParaButtonTheme; import com.fr.widgettheme.theme.widget.theme.cell.ButtonTheme; @@ -32,14 +33,18 @@ public class ParaButtonSettingPane extends ButtonSettingPane extends EditorSettingPane extends TreeEditorS @Override protected void assignFontSizePane(TreeTheme widgetTheme) { - ParaTreeTheme paraTreeTheme= (ParaTreeTheme) widgetTheme; - textStylePane.setTextStyle(paraTreeTheme.getTextStyle()); + ThemeTextStyle textStyle = widgetTheme.getTextStyle(); + fontSizePane.setValue(textStyle.getFontSize()); + fontColorButton.setColor(textStyle.getFontColor()); } @Override protected void assignFontSizeStyle(TreeTheme widgetTheme) { - ParaTreeTheme paraTreeTheme= (ParaTreeTheme) widgetTheme; - paraTreeTheme.setTextStyle(textStylePane.getTextStyle()); + ThemeTextStyle textStyle = new ThemeTextStyle(); + textStyle.setFontSize(fontSizePane.getValue()); + textStyle.setFontColor(fontColorButton.getColor()); + widgetTheme.setTextStyle(textStyle); } } From 9da035b8bbbf4173cbc26dfd9f3eddd834f24f6f Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 21 Dec 2023 19:38:24 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E6=94=B9=E4=B8=8B=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/widgettheme/util/ThemeTextStylePaneCreator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/widgettheme/util/ThemeTextStylePaneCreator.java b/designer-base/src/main/java/com/fr/widgettheme/util/ThemeTextStylePaneCreator.java index 34de319e9f..133f258646 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/util/ThemeTextStylePaneCreator.java +++ b/designer-base/src/main/java/com/fr/widgettheme/util/ThemeTextStylePaneCreator.java @@ -10,7 +10,7 @@ import javax.swing.JPanel; import java.awt.Component; /** - * 样式设置pane抽象类 + * 创建主题文本样式的工具类 * * @author obo * @since 11.0 From 37e8e433ff377d8873b64178a7648495c7974e4a Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 21 Dec 2023 19:46:40 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E5=B0=91=E6=8F=90=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/edit/widget/WidgetStyleEditPane.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java index 92300b00b9..1c8ab2ff14 100644 --- a/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java +++ b/designer-base/src/main/java/com/fr/widgettheme/theme/edit/widget/WidgetStyleEditPane.java @@ -3,6 +3,8 @@ package com.fr.widgettheme.theme.edit.widget; import com.fr.base.theme.TemplateTheme; import com.fr.design.beans.BasicBeanPane; import com.fr.design.designer.IntervalConstants; +import com.fr.design.gui.frpane.FontSizeComboPane; +import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.icombobox.LineComboBox; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ispinner.UISpinner; @@ -13,8 +15,8 @@ import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.style.color.NewColorSelectBox; import com.fr.stable.StringUtils; -import com.fr.widgettheme.theme.panel.WidgetTextStylePane; import com.fr.widgettheme.theme.widget.theme.WidgetThemeDisplayConstants; +import com.fr.widgettheme.util.ThemeTextStylePaneCreator; import org.jetbrains.annotations.Nullable; import javax.swing.BorderFactory; @@ -42,7 +44,9 @@ public class WidgetStyleEditPane extends BasicBeanPane< /** * 文本样式面板 */ - protected WidgetTextStylePane textStylePane; + protected FontSizeComboPane fontSizePane; + + protected UIColorButton fontColorButton; public WidgetStyleEditPane() { initComponents(); @@ -72,7 +76,7 @@ public class WidgetStyleEditPane extends BasicBeanPane< new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Color")), colorSelectBox}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Line")), lineComboBox}, new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Border_Radius")), borderRadiusSpinner}, - new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), textStylePane} + new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Widget_Theme_Text_Style")), ThemeTextStylePaneCreator.create(fontSizePane, fontColorButton)} }; } @@ -81,12 +85,12 @@ public class WidgetStyleEditPane extends BasicBeanPane< colorSelectBox.setSelectObject(WidgetThemeDisplayConstants.DEFAULT_THEME_COLOR); initLineBox(); borderRadiusSpinner = new UISpinner(0, Integer.MAX_VALUE, 1); - initTextStylePane(); - textStylePane.setFontSizeValue(16); + initFontSizePane(); + fontColorButton = new UIColorButton(); } - protected void initTextStylePane() { - textStylePane = new WidgetTextStylePane(FRFontPane.getFontSizes(), WidgetThemeDisplayConstants.THEME_WIDGET_COMPONENT_WIDTH); + protected void initFontSizePane() { + fontSizePane = new FontSizeComboPane(FRFontPane.getFontSizes()); } /** From 1203dd585a0452409b7e787b096e3bba0d2f457a Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 21 Dec 2023 19:53:26 +0800 Subject: [PATCH 07/14] =?UTF-8?q?=E6=94=B9=E4=B8=AA=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=EF=BC=8C=E6=8A=8A=E7=B1=BB=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=EF=BC=8C=E4=B8=8D=E6=8F=90=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BA=86=EF=BC=8C=E5=B0=B1=E4=B8=80=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/widgettheme/BaseStyleSettingPane.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java index b2de7d11f5..c15a504d7e 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java @@ -32,6 +32,7 @@ import javax.swing.BorderFactory; import javax.swing.ButtonGroup; import javax.swing.JPanel; import java.awt.BorderLayout; +import java.awt.Color; import java.awt.Component; import java.util.HashMap; import java.util.List; @@ -284,7 +285,7 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa fontSizePane.setValue(ThemeTextStyle.DEFAULT_FONT_SIZE); } if (fontColorButton != null) { - fontColorButton.setColor(ThemeTextStyle.DEFAULT_FONT_COLOR); + fontColorButton.setColor(Color.BLACK); } if (frFontPane != null) { frFontPane.populateBean(FRFont.getInstance()); From 4c5818d42893d5864cc6f646ef2c06c56ed53b5d Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 22 Dec 2023 10:43:20 +0800 Subject: [PATCH 08/14] =?UTF-8?q?REPORT-109525=20=E3=80=90=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E6=80=A7=E8=83=BD=E3=80=91=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/extra/PluginOperateUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java b/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java index e7e6845772..aa506e679f 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginOperateUtils.java @@ -153,9 +153,9 @@ public class PluginOperateUtils { public void run() { PluginMarker pluginMarker = PluginUtils.createPluginMarker(pluginInfo); PluginContext plugin = PluginManager.getContext(pluginMarker); - boolean isRunning = plugin.isRunning() || plugin.isPrepare(); - PluginTaskCallback modifyStatusCallback = new ModifyStatusCallback(isRunning, jsCallback); - changePluginActive(isRunning, pluginMarker, modifyStatusCallback, plugin); + boolean running = plugin.isRunning() || plugin.isPrepare(); + PluginTaskCallback modifyStatusCallback = new ModifyStatusCallback(running, jsCallback); + changePluginActive(running, pluginMarker, modifyStatusCallback, plugin); } }); } From 1e09143a006e03f31587314a9b6688ca315ef799 Mon Sep 17 00:00:00 2001 From: "Yuan.Wang" Date: Fri, 22 Dec 2023 11:18:41 +0800 Subject: [PATCH 09/14] =?UTF-8?q?REPORT-111169=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86=E5=90=AB=E6=9C=89=E6=B3=A8=E9=87=8A=E7=9A=84=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E4=BD=86=E5=8F=82=E6=95=B0=E4=BE=9D=E7=84=B6?= =?UTF-8?q?=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledatapane/DBTableDataPane.java | 14 +++++-- .../tabledatapane/DBTableDataPaneTest.java | 41 +++++++++++++++++++ 2 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 designer-base/src/test/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPaneTest.java diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index ed2417449c..4a0d1f665e 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -61,6 +61,7 @@ import com.fr.stable.ArrayUtils; import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; +import org.jetbrains.annotations.NotNull; import javax.swing.BorderFactory; import javax.swing.Box; @@ -416,10 +417,7 @@ public class DBTableDataPane extends AbstractTableDataPane implemen } private void checkParameter() { - String[] paramTexts = new String[2]; - paramTexts[0] = SqlUtils.clearSqlComments(this.sqlTextPane.getText()); - paramTexts[1] = SqlUtils.clearSqlComments(this.pageQuery); - Parameter[] parameters = ParameterHelper.analyze4Parameters(paramTexts, false); + Parameter[] parameters = getParameters(); if (parameters.length < 1 && this.editorPane.update().size() < 1) { return; @@ -443,6 +441,14 @@ public class DBTableDataPane extends AbstractTableDataPane implemen refreshParameters(); } + @NotNull + private Parameter[] getParameters() { + String[] paramTexts = new String[2]; + paramTexts[0] = SqlUtils.clearSqlComments(this.sqlTextPane.getText()); + paramTexts[1] = SqlUtils.clearSqlComments(this.pageQuery); + return ParameterHelper.analyze4Parameters(paramTexts, false); + } + @Override public void populateBean(DBTableData dbTableData) { this.dbTableData = dbTableData; diff --git a/designer-base/src/test/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPaneTest.java b/designer-base/src/test/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPaneTest.java new file mode 100644 index 0000000000..e549f13461 --- /dev/null +++ b/designer-base/src/test/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPaneTest.java @@ -0,0 +1,41 @@ +package com.fr.design.data.tabledata.tabledatapane; + +import com.fr.base.Parameter; +import com.fr.design.data.datapane.sqlpane.SQLEditPane; +import com.fr.invoke.Reflect; +import junit.framework.TestCase; +import org.junit.Assert; + +/** + * @author Yuan.Wang + * @since 11.0 + * Created on 2023/12/22 + */ +public class DBTableDataPaneTest extends TestCase { + + public void testGetParameters() { + DBTableDataPane pane = new DBTableDataPane(); + SQLEditPane editPane = new SQLEditPane(); + String sql = "select distinct 类别ID from S产品\n" + + "where 1=1\n" + + "order by 类别ID\n" + + "--${ if(len(comboBox0) = 0,\"\",\"AND 类别00ID = '\" + comboBox0 + \"'\")}"; + + String sql1 = "select distinct 类别ID from S产品\n" + + "where 1=1\n" + + "order by 类别ID\n" + + "${ if(len(comboBox0) = 0,\"\",\"AND 类别00ID = '\" + comboBox0 + \"'\")}"; + editPane.setText(sql); + Reflect.on(pane).set("sqlTextPane", editPane); + Reflect.on(pane).set("pageQuery", sql); + + Parameter[] parameters = Reflect.on(pane).call("getParameters").get(); + + Assert.assertEquals(0, parameters.length); + editPane.setText(sql1); + + parameters = Reflect.on(pane).call("getParameters").get(); + Assert.assertEquals(1, parameters.length); + Assert.assertEquals(parameters[0].getName(), "comboBox0"); + } +} \ No newline at end of file From 0c33d07a09190b4262985e2dc8f20dec1b0b1289 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 22 Dec 2023 11:48:00 +0800 Subject: [PATCH 10/14] =?UTF-8?q?REPORT-111841=20=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E5=90=8E=E4=B8=8D=E8=BE=93=E5=87=BA=E4=BB=BB=E4=BD=95=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/module/DesignerActivator.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java index b8a0444770..15edc3e095 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerActivator.java @@ -554,7 +554,6 @@ public class DesignerActivator extends Activator implements Prepare { EventDispatcher.listen(DesignerLaunchStatus.STARTUP_COMPLETE, new Listener() { @Override public void on(Event event, Null param) { - FineLoggerFactory.reset(); new SwingWorker() { @Override From 5c71eb243761c4a7703bcedfff39c84239d4c768 Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 22 Dec 2023 13:53:09 +0800 Subject: [PATCH 11/14] =?UTF-8?q?REPORT-111723=20=E3=80=90=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E6=98=BE=E7=A4=BA=E5=A2=9E=E5=BC=BA=E3=80=91=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E5=BD=93=E5=89=8D=E6=A8=A1=E6=9D=BF=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E6=8C=89=E9=92=AE=E5=92=8C=E6=A0=87=E7=AD=BE=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/widgettheme/BaseStyleSettingPane.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java index c15a504d7e..b651b9373b 100644 --- a/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java +++ b/designer-form/src/main/java/com/fr/design/widgettheme/BaseStyleSettingPane.java @@ -217,7 +217,7 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa setLineComboBox(widgetStyle); setBorderRadiusSpinner(widgetStyle); setTextStylePane(widgetStyle); - setFrFontPane(); + setFrFontPane(widgetStyle); setButtonStyleDefinedPane(widgetStyle); setSelectBgColor(widgetStyle); } @@ -257,9 +257,9 @@ public abstract class BaseStyleSettingPane extends BasicBeanPa this.fontColorButton.setColor(textStyle.getFontColor()); } - private void setFrFontPane() { + private void setFrFontPane(ThemedWidgetStyle widgetStyle) { if (frFontPane != null) { - frFontPane.populateBean(FRFont.getInstance()); + frFontPane.populateBean(widgetStyle.getFontStyle().getFont()); } } From 31a4146d024d48b077587a31f93ce764706af52d Mon Sep 17 00:00:00 2001 From: obo Date: Fri, 22 Dec 2023 14:16:29 +0800 Subject: [PATCH 12/14] =?UTF-8?q?REPORT-111281=20=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E7=BD=AE=E5=90=8E=EF=BC=8C=E6=96=B0=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=BC=80=E5=90=AF=E5=8F=98=E6=88=90=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/strongest/WidgetThemeListenerStarter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/strongest/WidgetThemeListenerStarter.java b/designer-realize/src/main/java/com/fr/strongest/WidgetThemeListenerStarter.java index e39521fd4e..8d2522350a 100644 --- a/designer-realize/src/main/java/com/fr/strongest/WidgetThemeListenerStarter.java +++ b/designer-realize/src/main/java/com/fr/strongest/WidgetThemeListenerStarter.java @@ -53,7 +53,7 @@ public class WidgetThemeListenerStarter { BaseBook workBook = (BaseBook) temp.getTarget(); if (isNeedAddAttr(temp, workBook)) { WidgetDisplayEnhanceMarkAttr attr = new WidgetDisplayEnhanceMarkAttr(); - attr.setWidgetEnhance(true); + attr.setWidgetEnhance(false); workBook.addAttrMark(attr); } } From 076b42605c9cd972a6e6fac2f102fc399adc23b7 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 25 Dec 2023 15:46:47 +0800 Subject: [PATCH 13/14] =?UTF-8?q?REPORT-109129=20=E5=81=B6=E7=8E=B0?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=85=B3=E9=97=AD=E5=90=8E=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=E6=AE=8B=E7=95=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/DesignerSuperListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java b/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java index ee4b265022..82aa33207f 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java @@ -37,7 +37,7 @@ public class DesignerSuperListener { private final ScheduledExecutorService service = Executors.newScheduledThreadPool(2, new NamedThreadFactory("DesignerListener")); private final ExecutorService helpService = Executors.newSingleThreadExecutor( new NamedThreadFactory("DesignerSuperListener-Help")); - + private final ScheduledExecutorService EXIT_SERVICE = Executors.newSingleThreadScheduledExecutor( new NamedThreadFactory("DesignerSuperListener-Exit")); private FineProcess process; private ScheduledFuture fixedFuture; private ScheduledFuture onceFuture; @@ -141,6 +141,8 @@ public class DesignerSuperListener { } private void fallBackReport() { + // 60S都没退出去就强制关闭 + EXIT_SERVICE.schedule(() -> System.exit(1), 60, TimeUnit.SECONDS); DesignUtils.initLookAndFeel(); StartErrorMessageCollector.getInstance().record(DesignerErrorMessage.UNEXCEPTED_FALL_BACK.getId(), DesignerErrorMessage.UNEXCEPTED_FALL_BACK.getMessage(), From e1f72173dcf3b2995e4e38a616d291e5301b5a01 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Mon, 25 Dec 2023 16:08:26 +0800 Subject: [PATCH 14/14] =?UTF-8?q?REPORT-109129=20=E5=81=B6=E7=8E=B0?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E5=85=B3=E9=97=AD=E5=90=8E=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=E6=AE=8B=E7=95=99=20=E6=B7=BB=E5=8A=A0=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/start/DesignerSuperListener.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java b/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java index 82aa33207f..df62a34412 100644 --- a/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java +++ b/designer-realize/src/main/java/com/fr/start/DesignerSuperListener.java @@ -11,6 +11,7 @@ import com.fr.event.Event; import com.fr.event.Listener; import com.fr.event.Null; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; import com.fr.process.FineProcess; import com.fr.process.ProcessEventPipe; import com.fr.process.engine.core.FineProcessContext; @@ -142,7 +143,10 @@ public class DesignerSuperListener { private void fallBackReport() { // 60S都没退出去就强制关闭 - EXIT_SERVICE.schedule(() -> System.exit(1), 60, TimeUnit.SECONDS); + EXIT_SERVICE.schedule(() -> { + FineLoggerFactory.getLogger().error("[DesignerSuperListener] The designer failed to exit gracefully, attempting a forced shutdown."); + System.exit(1); + }, 60, TimeUnit.SECONDS); DesignUtils.initLookAndFeel(); StartErrorMessageCollector.getInstance().record(DesignerErrorMessage.UNEXCEPTED_FALL_BACK.getId(), DesignerErrorMessage.UNEXCEPTED_FALL_BACK.getMessage(),