From 444d7093f6fb58f41fd5e9fc7526803a46739dd1 Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 19 May 2020 16:04:36 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-29815=20&&=20REPORT-29815=20=E4=B9=8B?= =?UTF-8?q?=E5=89=8D=E6=B7=BB=E5=8A=A0=E5=88=B0final=E7=9A=84=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=88=B0release?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/unit/UnitConvertUtil.java | 23 ++++++++++++++++++- .../design/actions/FormMobileAttrAction.java | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/unit/UnitConvertUtil.java b/designer-base/src/main/java/com/fr/design/unit/UnitConvertUtil.java index 406ddcfdde..520430d51d 100644 --- a/designer-base/src/main/java/com/fr/design/unit/UnitConvertUtil.java +++ b/designer-base/src/main/java/com/fr/design/unit/UnitConvertUtil.java @@ -6,7 +6,11 @@ import com.fr.design.unit.impl.CMReportLengthUNIT; import com.fr.design.unit.impl.INCHReportLengthUNIT; import com.fr.design.unit.impl.MMReportLengthUNIT; import com.fr.design.unit.impl.PTReportLengthUNIT; - +import com.fr.general.GeneralContext; +import com.fr.plugin.context.PluginContext; +import com.fr.plugin.manage.PluginFilter; +import com.fr.plugin.observer.PluginEvent; +import com.fr.plugin.observer.PluginEventListener; import java.util.ArrayList; import java.util.List; import java.util.Set; @@ -18,6 +22,23 @@ public class UnitConvertUtil { private static List lengthUNITList = new ArrayList(); static { + GeneralContext.listenPluginRunningChanged(new PluginEventListener() { + @Override + public void on(PluginEvent pluginEvent) { + initSupportedReportLengthUNIT(); + } + }, new PluginFilter() { + @Override + public boolean accept(PluginContext pluginContext) { + return pluginContext.contain(ReportLengthUNITProvider.MARK_STRING); + } + }); + + initSupportedReportLengthUNIT(); + } + + private static void initSupportedReportLengthUNIT(){ + lengthUNITList.clear(); lengthUNITList.add(new MMReportLengthUNIT()); lengthUNITList.add(new CMReportLengthUNIT()); lengthUNITList.add(new INCHReportLengthUNIT()); diff --git a/designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java b/designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java index deec25c0b1..6227c169b1 100644 --- a/designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java +++ b/designer-form/src/main/java/com/fr/design/actions/FormMobileAttrAction.java @@ -112,7 +112,7 @@ public class FormMobileAttrAction extends JTemplateAction { private static final MenuKeySet REPORT_APP_ATTR = new MenuKeySet() { @Override public char getMnemonic() { - return 'T'; + return 'P'; } @Override