Browse Source

Pull request #12067: REPORT-94597 安装【平台内打开标签页】插件,FR图表超链会多两个重复下拉项

Merge in DESIGN/design from ~LEVY.XIE/design:release/11.0 to release/11.0

* commit '5deb7120453577b00087c82303a4c90030406874':
  REPORT-94597 安装【平台内打开标签页】插件,FR图表超链会多两个重复下拉项 改用ListMap保持一致
  REPORT-94597 安装【平台内打开标签页】插件,FR图表超链会多两个重复下拉项
  REPORT-94597 安装【平台内打开标签页】插件,FR图表超链会多两个重复下拉项
newui
Levy.Xie-解安森 2 years ago
parent
commit
d3e537fea1
  1. 17
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

17
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

@ -154,24 +154,23 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
}
HashMap paneMap = getHyperlinkMap();
//安装平台内打开插件时,添加相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
java.util.List<UIMenuNameableCreator> list = refreshList(paneMap);
Map<String, NameObjectCreator> creators = new ListMap<>();
int size = list.size();
NameObjectCreator[] creators = new NameObjectCreator[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<HyperlinkProvider> 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]));
}
public void populate(Plot plot) {
@ -303,7 +302,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
@Override
protected void initCreatorsFilter() {
this.creatorsFilter = nameableCreator -> {
this.creatorsFilter = nameableCreator -> {
Class<? extends JavaScript> clazz = nameableCreator.getHyperlink();
JTemplate template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (!JTemplate.isValid(template)) {

Loading…
Cancel
Save