From f5ee57677838ab9371202cb3c8dd9b0755926350 Mon Sep 17 00:00:00 2001 From: "Levy.Xie" Date: Mon, 24 Apr 2023 13:44:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-94597=20=E5=AE=89=E8=A3=85=E3=80=90?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=86=85=E6=89=93=E5=BC=80=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E9=A1=B5=E3=80=91=E6=8F=92=E4=BB=B6=EF=BC=8CFR=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E8=B6=85=E9=93=BE=E4=BC=9A=E5=A4=9A=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E4=B8=8B=E6=8B=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom/component/VanChartHyperLinkPane.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java index efd6ec73de..5080e60d97 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java @@ -46,6 +46,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; @@ -152,24 +153,23 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { setPlot(plot); HashMap paneMap = getHyperlinkMap(plot); - //安装平台内打开插件时,添加相应按钮 - Set providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG); java.util.List list = refreshList(paneMap); + Map creators = new LinkedHashMap<>(); int size = list.size(); - NameObjectCreator[] creators = new NameObjectCreator[list.size() + providers.size()]; for (int i = 0; i < size; i++) { UIMenuNameableCreator uiMenuNameableCreator = list.get(i); - creators[i] = new NameObjectCreator(uiMenuNameableCreator.getName(), uiMenuNameableCreator.getObj().getClass(), uiMenuNameableCreator.getPaneClazz()); + NameObjectCreator creator = new NameObjectCreator(uiMenuNameableCreator.getName(), uiMenuNameableCreator.getObj().getClass(), uiMenuNameableCreator.getPaneClazz()); + creators.put(uiMenuNameableCreator.getName(), creator); } + //安装平台内打开插件时, 添加/替换 相应按钮 + Set providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG); for (HyperlinkProvider provider : providers) { NameableCreator creator = provider.createHyperlinkCreator(); if (creator != null) { - creators[size] = new NameObjectCreator(creator.menuName(), creator.getHyperlink(), creator.getUpdatePane()); - size++; + creators.put(creator.menuName(), new NameObjectCreator(creator.menuName(), creator.getHyperlink(), creator.getUpdatePane())); } } - - refreshNameableCreator(creators); + refreshNameableCreator(creators.values().toArray(new NameObjectCreator[0])); java.util.List nameObjects = new ArrayList(); From d3af0f553b23ce0adf9998e6bf87ca624e0a993a Mon Sep 17 00:00:00 2001 From: "Levy.Xie" Date: Mon, 24 Apr 2023 14:14:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-94597=20=E5=AE=89=E8=A3=85=E3=80=90?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=86=85=E6=89=93=E5=BC=80=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E9=A1=B5=E3=80=91=E6=8F=92=E4=BB=B6=EF=BC=8CFR=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E8=B6=85=E9=93=BE=E4=BC=9A=E5=A4=9A=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E4=B8=8B=E6=8B=89=E9=A1=B9=20=E6=94=B9?= =?UTF-8?q?=E7=94=A8ListMap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/van/chart/custom/component/VanChartHyperLinkPane.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java index 5080e60d97..eed8d69dd8 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java @@ -46,7 +46,6 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.HashMap; -import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; @@ -154,7 +153,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { HashMap paneMap = getHyperlinkMap(plot); java.util.List list = refreshList(paneMap); - Map creators = new LinkedHashMap<>(); + Map creators = new ListMap<>(); int size = list.size(); for (int i = 0; i < size; i++) { UIMenuNameableCreator uiMenuNameableCreator = list.get(i);