From 4505430def0ac2b105144ccc965af723956426a0 Mon Sep 17 00:00:00 2001 From: "Henry.Wang" Date: Tue, 12 Apr 2022 11:34:45 +0800 Subject: [PATCH 1/6] =?UTF-8?q?REPORT-68987=20=E6=8A=8A=E9=AB=98=E7=BA=A7?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=BD=93=E4=BD=9C=E5=8F=AF=E9=80=89=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/javascript/JSContentPane.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java b/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java index 65bec03a84..c9344f5ca8 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java @@ -63,7 +63,9 @@ public class JSContentPane extends BasicPane { initFunctionTitle(args); JPanel jsParaPane = createJSParaPane(); - addNewPaneLabel(); + if (needAdvancedEditor()) { + addNewPaneLabel(); + } this.add(jsParaPane, BorderLayout.NORTH); UIScrollPane sp = createContentTextAreaPanel(); @@ -323,4 +325,8 @@ public class JSContentPane extends BasicPane { return provider; } + + protected boolean needAdvancedEditor() { + return true; + } } \ No newline at end of file From 8062c66a8ce3bdd7efb8a8cc89fbfac44f0d6276 Mon Sep 17 00:00:00 2001 From: Yvan Date: Tue, 12 Apr 2022 18:53:56 +0800 Subject: [PATCH 2/6] =?UTF-8?q?REPORT-69422=20=E4=BA=A7=E5=93=81=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E9=83=A8=E5=88=86UI=20&&=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E6=B2=A1=E5=8F=8D=E5=BA=94=20?= =?UTF-8?q?=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=911.?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8C=B9=E9=85=8D=E6=96=87=E5=AD=97=E9=AB=98?= =?UTF-8?q?=E4=BA=AE=E8=B0=83=E6=95=B4=E4=B8=BA=E5=8C=B9=E9=85=8D=E6=96=87?= =?UTF-8?q?=E5=AD=97=E5=8A=A0=E7=B2=97=EF=BC=9B2.UIList=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E5=AF=B9=E8=B1=A1=E7=9A=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E4=B8=BA=E7=A9=BA=20=E3=80=90=E6=94=B9?= =?UTF-8?q?=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=911.=E6=94=B9UI=EF=BC=9B2.?= =?UTF-8?q?=E8=87=AA=E5=B7=B1=E5=86=99=E4=B8=80=E4=B8=8B=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E5=AF=B9=E8=B1=A1=E7=9A=84=E9=80=BB=E8=BE=91?= =?UTF-8?q?=20=E3=80=90review=E5=BB=BA=E8=AE=AE=E3=80=91=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/TableDataTreePane.java | 20 ++++++++++++------- .../search/view/TreeSearchRendererHelper.java | 2 +- .../ilist/CheckBoxListWithPartialSelect.java | 9 ++++++++- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java index 283aa0772a..8f03b1cfc4 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java @@ -596,6 +596,7 @@ public class TableDataTreePane extends BasicTableDataTreePane { int[] rows = tableDataTree.getSelectionRows(); tableDataTree.refreshChildByName(tdName); tableDataTree.setSelectionRows(rows); + FineLoggerFactory.getLogger().info("add table data succeeded for {}", tdName); } @Override @@ -1057,7 +1058,11 @@ public class TableDataTreePane extends BasicTableDataTreePane { TableDataTreeSearchManager.getInstance().outOfSearchMode(); } for (Object toRemove : selectedValues) { - doRemove((NameObject) toRemove); + try { + doRemove((String) toRemove); + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e, "remove table data failed for {}", toRemove); + } } } @@ -1069,9 +1074,9 @@ public class TableDataTreePane extends BasicTableDataTreePane { basicDialog.setVisible(true); } - private void doRemove(NameObject selectedNO) { + private void doRemove(String toRemove) throws Exception { // richer:这个地方为什么要在DataSourceTree里面去remove呢?多此一举吧 - op.removeAction(selectedNO.getName()); + op.removeAction(toRemove); tableDataTree.refresh(); // Richie:默认最后一行获得焦点. tableDataTree.requestFocus(); @@ -1080,14 +1085,15 @@ public class TableDataTreePane extends BasicTableDataTreePane { checkButtonEnabled(); //删掉缓存配置 - StrategyConfigAttrUtils.removeStrategyConfig(selectedNO.getName()); + StrategyConfigAttrUtils.removeStrategyConfig(toRemove); // 如果一个模版是平台开启,这个数据集的配置不会存xml,预览模版时直接从全局配置copy,这样 // 导致删除的时候StrategyConfigsAttrSavedHook没有通过前后配置比较感知数据集被删除,因此不会发出事件让其失效 // 这里额外发出一次数据集修改事件 - StrategyEventsNotifier.modifyDataSet(new DSMapping(getTplPath(), new DsNameTarget(selectedNO.getName()))); - DesignTableDataManager.removeSelectedColumnNames(selectedNO.getName()); - DesignModelAdapter.getCurrentModelAdapter().removeTableDataParameters(selectedNO.getName()); + StrategyEventsNotifier.modifyDataSet(new DSMapping(getTplPath(), new DsNameTarget(toRemove))); + DesignTableDataManager.removeSelectedColumnNames(toRemove); + DesignModelAdapter.getCurrentModelAdapter().removeTableDataParameters(toRemove); + FineLoggerFactory.getLogger().info("remove table data succeeded for {}", toRemove); } } diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/management/search/view/TreeSearchRendererHelper.java b/designer-base/src/main/java/com/fr/design/data/datapane/management/search/view/TreeSearchRendererHelper.java index fa445b7fb8..340c6912ac 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/management/search/view/TreeSearchRendererHelper.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/management/search/view/TreeSearchRendererHelper.java @@ -67,7 +67,7 @@ public class TreeSearchRendererHelper { } private String getHighlightText(String text, String textToHighlight) { - String highLightTemplate = "$1"; + String highLightTemplate = "$1"; if (textToHighlight.length() == 0) { return text; } diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/CheckBoxListWithPartialSelect.java b/designer-base/src/main/java/com/fr/design/gui/ilist/CheckBoxListWithPartialSelect.java index 88d98991d6..fe1c6bda89 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilist/CheckBoxListWithPartialSelect.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilist/CheckBoxListWithPartialSelect.java @@ -16,6 +16,7 @@ import java.awt.Component; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; +import java.util.ArrayList; import java.util.List; /** @@ -67,7 +68,13 @@ public class CheckBoxListWithPartialSelect extends JPanel { } public List getSelectedObjects() { - return dataList.getSelectedValuesList(); + List seleted = new ArrayList<>(); + for (UICheckBox dataCheckBox : dataCheckBoxes) { + if (dataCheckBox.isSelected()) { + seleted.add(dataCheckBox.getText()); + } + } + return seleted; } protected MouseListener getDataListMouseListener() { From 61104a34943e1269f11d713a7f705e6d3104725f Mon Sep 17 00:00:00 2001 From: pengda Date: Tue, 12 Apr 2022 19:56:35 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/formula/FunctionConstants.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java b/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java index 17e61b5e9f..1c974b906a 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java +++ b/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java @@ -58,6 +58,7 @@ public final class FunctionConstants { public static FunctionGroup ALL = getAllFunctionGroup(); public static List abandonFormulas = Arrays.asList("CIRCULAR", "CROSSLAYERTOTAL", "HIERARCHY", "LAYERTOTAL"); public static NameAndFunctionList NEW = getNewFunctionList(); + private static List shieldedFormulas = Arrays.asList("ENBYSTRNUM","TEXTGETNUM" ,"GETCHARNUM","GCD", "LCM"); static { loadEmbededFunctions(); @@ -102,7 +103,7 @@ public final class FunctionConstants { if (StableUtils.classInstanceOf(cls, iface)) { Function inst; inst = (Function) cls.newInstance(); - if (abandonFormulas.contains(inst.getClass().getSimpleName())) { + if (abandonFormulas.contains(inst.getClass().getSimpleName()) || shieldedFormulas.contains(inst.getClass().getSimpleName()) { continue; } for (NameAndTypeAndFunctionList EMBFUNCTION : EMBFUNCTIONS) { From 6fe3d03ed79d9f7180949acce44b00694d69ca6b Mon Sep 17 00:00:00 2001 From: pengda Date: Wed, 13 Apr 2022 09:46:16 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=97=A0jira=E4=BB=BB=E5=8A=A1=EF=BC=8C?= =?UTF-8?q?=E5=B1=8F=E8=94=BD=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/formula/FunctionConstants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java b/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java index 1c974b906a..a1d6023d09 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java +++ b/designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java @@ -103,7 +103,7 @@ public final class FunctionConstants { if (StableUtils.classInstanceOf(cls, iface)) { Function inst; inst = (Function) cls.newInstance(); - if (abandonFormulas.contains(inst.getClass().getSimpleName()) || shieldedFormulas.contains(inst.getClass().getSimpleName()) { + if (abandonFormulas.contains(inst.getClass().getSimpleName()) || shieldedFormulas.contains(inst.getClass().getSimpleName())) { continue; } for (NameAndTypeAndFunctionList EMBFUNCTION : EMBFUNCTIONS) { From 21e74c063da0ef0304a1f3c72f2fabcb7ac61afa Mon Sep 17 00:00:00 2001 From: Yvan Date: Wed, 13 Apr 2022 13:49:56 +0800 Subject: [PATCH 5/6] =?UTF-8?q?REPORT-68726=20=E3=80=90=E8=BF=AD=E4=BB=A3?= =?UTF-8?q?=E3=80=91=E3=80=90=E6=95=B0=E6=8D=AE=E9=9B=86=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=91=E5=A4=9A=E5=BC=A0=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=A7=A6=E5=8F=91=E6=90=9C=E7=B4=A2=EF=BC=8C?= =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=A6=82=E7=8E=87=E5=8D=A1=E4=BD=8F?= =?UTF-8?q?=20=E3=80=90=E9=97=AE=E9=A2=98=E5=8E=9F=E5=9B=A0=E3=80=91?= =?UTF-8?q?=E4=B9=8B=E5=89=8D=E6=B2=A1=E4=BF=AE=E6=94=B9=E5=A5=BD=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E5=87=BA=E7=8E=B0=E6=90=9C=E7=B4=A2=E6=A1=86?= =?UTF-8?q?=E6=96=87=E5=AD=97=E4=B8=8D=E6=B8=85=E7=A9=BA=E7=9A=84=E6=83=85?= =?UTF-8?q?=E5=86=B5=20=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF?= =?UTF-8?q?=E3=80=91=E4=BF=AE=E6=94=B9=E4=B8=BA=E6=AF=8F=E6=AC=A1=E7=A6=BB?= =?UTF-8?q?=E5=BC=80=E6=90=9C=E7=B4=A2=E6=A8=A1=E5=BC=8F=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=83=85=E5=86=B5=E6=90=9C=E7=B4=A2=E6=A1=86=20=E3=80=90review?= =?UTF-8?q?=E5=BB=BA=E8=AE=AE=E3=80=91=E6=97=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../management/search/pane/TreeSearchToolbarPane.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java index ea51e1a821..7524efed2a 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java @@ -156,9 +156,7 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha returnLabel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { - searchTextField.setText(StringUtils.EMPTY); TableDataTreeSearchManager.getInstance().outOfSearchMode(); - switchPane(TOOLBAR_PANE); } }); @@ -200,6 +198,11 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha @Override public void updateTreeSearchChange(TreeSearchStatusChangeEvent event) { TreeSearchStatus treeSearchStatus = event.getTreeSearchStatus(); - switchPane(treeSearchStatus == TreeSearchStatus.NOT_IN_SEARCH_MODE ? TOOLBAR_PANE : SEARCH_PANE); + if (treeSearchStatus == TreeSearchStatus.NOT_IN_SEARCH_MODE) { + this.searchTextField.setText(StringUtils.EMPTY); + switchPane(TOOLBAR_PANE); + } else { + switchPane(SEARCH_PANE); + } } } From cf3c6965d0347ec59565a31a0edb974dba6c9467 Mon Sep 17 00:00:00 2001 From: pengda Date: Wed, 13 Apr 2022 16:35:54 +0800 Subject: [PATCH 6/6] =?UTF-8?q?CHART-22994=20=E5=9B=BE=E8=A1=A8=E8=83=8C?= =?UTF-8?q?=E6=99=AF=E8=89=B2=E6=8E=A7=E4=BB=B6=E9=9C=80=E8=A6=81=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2=E4=B8=BA=E6=94=AF=E6=8C=81=E9=80=8F=E6=98=8E=E8=89=B2?= =?UTF-8?q?=E7=9A=84=E6=8E=A7=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/edit/chart/ChartTitleAndBackgroundStylePane.java | 2 +- .../designer/component/background/VanChartBackgroundPane.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStylePane.java b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStylePane.java index 6bac518763..5705935866 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStylePane.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStylePane.java @@ -77,7 +77,7 @@ public class ChartTitleAndBackgroundStylePane extends AbstractChartStylePane { private void initList() { paneList = new ArrayList<>(); paneList.add(new NullBackgroundQuickPane()); - paneList.add(new ColorBackgroundQuickPane()); + paneList.add(new ColorBackgroundQuickPane(true)); paneList.add(new ImageBackgroundQuickPane(false)); paneList.add(new VanChartGradientPane()); } diff --git a/designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.java b/designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.java index c51ac0fe9f..f3de5d17fb 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.java @@ -148,7 +148,7 @@ public class VanChartBackgroundPane extends BasicPane { protected void initList() { paneList.add(new NullBackgroundQuickPane()); - paneList.add(new ColorBackgroundQuickPane()); + paneList.add(new ColorBackgroundQuickPane(true)); paneList.add(new ImageBackgroundQuickPane(false)); paneList.add(new VanChartGradientPane()); }