From 03a3ffe770f91258e5c8f7a2db00ce66a80ce5b9 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 22 Aug 2017 09:43:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?PFC-607=20=E6=8F=92=E4=BB=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=88=A0=E9=99=A4=E6=9B=B4=E6=96=B0=E4=B8=8D=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=94=AF=E6=8C=81=20=E6=B7=BB=E5=8A=A0=E6=89=93?= =?UTF-8?q?=E5=8C=85=E5=89=8D=E9=A2=84=E5=A4=84=E7=90=86=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E8=BF=99=E4=B8=AA=E6=97=B6=E5=80=99=E5=81=9A=E5=8A=A0=E5=AF=86?= =?UTF-8?q?=E3=80=81=E8=87=AA=E5=8A=A8=E6=B7=BB=E5=8A=A0currentAPILevel?= =?UTF-8?q?=E7=AD=89class=E6=96=87=E4=BB=B6=E7=9A=84=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/fun/ExportToolBarProvider.java | 5 +++-- .../com/fr/design/chart/fun/IndependentChartUIProvider.java | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/fun/ExportToolBarProvider.java b/designer_base/src/com/fr/design/fun/ExportToolBarProvider.java index 4e53e96dd2..cfcfd2586f 100644 --- a/designer_base/src/com/fr/design/fun/ExportToolBarProvider.java +++ b/designer_base/src/com/fr/design/fun/ExportToolBarProvider.java @@ -1,6 +1,6 @@ package com.fr.design.fun; -import com.fr.plugin.injectable.SpecialLevel; +import com.fr.stable.fun.mark.API; import com.fr.stable.fun.mark.Mutable; import javax.swing.*; @@ -8,9 +8,10 @@ import javax.swing.*; /** * 导出菜单设计器端拓展,用于控制该菜单是否在web端显示 */ +@API(level = ExportToolBarProvider.CURRENT_LEVEL) public interface ExportToolBarProvider extends Mutable{ - String XML_TAG = SpecialLevel.ExportToolBarProvider.getTagName(); + String XML_TAG = "ExportToolBarProvider"; int CURRENT_LEVEL = 1; diff --git a/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java b/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java index 290e22eaac..68efd13c78 100644 --- a/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java +++ b/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java @@ -12,8 +12,8 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; -import com.fr.plugin.injectable.SpecialLevel; import com.fr.stable.fun.Level; +import com.fr.stable.fun.mark.API; /** * Created by eason on 14/12/29. @@ -21,9 +21,10 @@ import com.fr.stable.fun.Level; * @since 8.0 * 自定义图表类型设设计界面接口 */ +@API(level = IndependentChartUIProvider.CURRENT_API_LEVEL) public interface IndependentChartUIProvider extends Level { - String XML_TAG = SpecialLevel.IndependentChartUIProvider.getTagName(); + String XML_TAG = "IndependentChartUIProvider"; int CURRENT_API_LEVEL = 3; From a8dc0b036c98acac03deb792824124cdfdcde712 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Tue, 22 Aug 2017 10:13:32 +0800 Subject: [PATCH 2/3] =?UTF-8?q?PFC-607=20=E6=8F=92=E4=BB=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=88=A0=E9=99=A4=E6=9B=B4=E6=96=B0=E4=B8=8D=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=94=AF=E6=8C=81=20=E4=B8=8D=E5=90=88=E8=A7=84?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3=E7=B1=BB=E4=B8=8D=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/fun/ExportToolBarProvider.java | 5 ++--- .../com/fr/design/chart/fun/IndependentChartUIProvider.java | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/designer_base/src/com/fr/design/fun/ExportToolBarProvider.java b/designer_base/src/com/fr/design/fun/ExportToolBarProvider.java index cfcfd2586f..4e53e96dd2 100644 --- a/designer_base/src/com/fr/design/fun/ExportToolBarProvider.java +++ b/designer_base/src/com/fr/design/fun/ExportToolBarProvider.java @@ -1,6 +1,6 @@ package com.fr.design.fun; -import com.fr.stable.fun.mark.API; +import com.fr.plugin.injectable.SpecialLevel; import com.fr.stable.fun.mark.Mutable; import javax.swing.*; @@ -8,10 +8,9 @@ import javax.swing.*; /** * 导出菜单设计器端拓展,用于控制该菜单是否在web端显示 */ -@API(level = ExportToolBarProvider.CURRENT_LEVEL) public interface ExportToolBarProvider extends Mutable{ - String XML_TAG = "ExportToolBarProvider"; + String XML_TAG = SpecialLevel.ExportToolBarProvider.getTagName(); int CURRENT_LEVEL = 1; diff --git a/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java b/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java index 68efd13c78..290e22eaac 100644 --- a/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java +++ b/designer_chart/src/com/fr/design/chart/fun/IndependentChartUIProvider.java @@ -12,8 +12,8 @@ import com.fr.design.mainframe.chart.gui.ChartStylePane; import com.fr.design.mainframe.chart.gui.data.report.AbstractReportDataContentPane; import com.fr.design.mainframe.chart.gui.data.table.AbstractTableDataContentPane; import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane; +import com.fr.plugin.injectable.SpecialLevel; import com.fr.stable.fun.Level; -import com.fr.stable.fun.mark.API; /** * Created by eason on 14/12/29. @@ -21,10 +21,9 @@ import com.fr.stable.fun.mark.API; * @since 8.0 * 自定义图表类型设设计界面接口 */ -@API(level = IndependentChartUIProvider.CURRENT_API_LEVEL) public interface IndependentChartUIProvider extends Level { - String XML_TAG = "IndependentChartUIProvider"; + String XML_TAG = SpecialLevel.IndependentChartUIProvider.getTagName(); int CURRENT_API_LEVEL = 3; From bbff7976c70a74f1c694408270e5c169a089aa94 Mon Sep 17 00:00:00 2001 From: juhaoyu <2335173323@qq.com> Date: Thu, 24 Aug 2017 18:34:00 +0800 Subject: [PATCH 3/3] =?UTF-8?q?PFC-607=20=E6=8F=92=E4=BB=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=88=A0=E9=99=A4=E6=9B=B4=E6=96=B0=E4=B8=8D=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=94=AF=E6=8C=81=20=E6=94=BE=E5=BC=83=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E4=BB=A3=E7=90=86=EF=BC=8C=E7=94=A8javassist=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E7=9B=B8=E5=90=8C=E5=8A=9F=E8=83=BD:=201=E3=80=81?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=BB=A3=E7=90=86=E4=B8=8D=E8=83=BD=E4=BD=9C?= =?UTF-8?q?=E7=94=A8=E5=88=B0=E6=B2=A1=E6=8E=A5=E5=8F=A3=E7=9A=84class?= =?UTF-8?q?=E4=B8=8A=202=E3=80=81=E5=8A=A8=E6=80=81=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E6=94=B9=E5=8F=98=E4=BA=86class=E7=9A=84=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=EF=BC=8C=E5=BC=80=E5=8F=91=E5=92=8C=E8=B0=83=E8=AF=95=E9=83=BD?= =?UTF-8?q?=E4=B8=8D=E5=A4=AA=E6=96=B9=E4=BE=BF=203=E3=80=81=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E4=BB=A3=E7=90=86=E5=BD=B1=E5=93=8D=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/ExtraDesignClassManager.java | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/designer_base/src/com/fr/design/ExtraDesignClassManager.java b/designer_base/src/com/fr/design/ExtraDesignClassManager.java index 54fbcf2f10..fe11379c48 100644 --- a/designer_base/src/com/fr/design/ExtraDesignClassManager.java +++ b/designer_base/src/com/fr/design/ExtraDesignClassManager.java @@ -6,7 +6,13 @@ package com.fr.design; import com.fr.base.BaseUtils; import com.fr.design.data.datapane.TableDataNameObjectCreator; -import com.fr.design.fun.*; +import com.fr.design.fun.CellWidgetOptionProvider; +import com.fr.design.fun.Feedback; +import com.fr.design.fun.FormWidgetOptionProvider; +import com.fr.design.fun.ParameterWidgetOptionProvider; +import com.fr.design.fun.ServerTableDataDefineProvider; +import com.fr.design.fun.TableDataDefineProvider; +import com.fr.design.fun.ToolbarItemProvider; import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOptionFactory; import com.fr.design.menu.ShortCut; @@ -16,13 +22,19 @@ import com.fr.general.FRLogger; import com.fr.general.GeneralUtils; import com.fr.general.IOUtils; import com.fr.plugin.AbstractExtraClassManager; -import com.fr.plugin.solution.closeable.CompatibleInjectionContainer; import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginSingleInjection; +import com.fr.plugin.solution.closeable.CloseableContainedSet; import com.fr.stable.bridge.StableFactory; import com.fr.stable.plugin.ExtraDesignClassManagerProvider; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; /** * @author : richie @@ -33,7 +45,7 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement private static ExtraDesignClassManager classManager = new ExtraDesignClassManager(); - private CompatibleInjectionContainer shortCuts = new CompatibleInjectionContainer<>(); + private Set shortCuts = new CloseableContainedSet<>(HashSet.class); public synchronized static ExtraDesignClassManager getInstance() { return classManager; @@ -204,8 +216,8 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement @Override protected boolean demountSpecific(PluginSingleInjection injection) { - - if (ShortCut.TEMPLATE_TREE.equals(injection.getName()) && injection.getOriginalObject() instanceof ShortCut) { + + if (ShortCut.TEMPLATE_TREE.equals(injection.getName()) && injection.getObject() instanceof ShortCut) { shortCuts.remove(injection.getObject()); return true; } @@ -214,16 +226,16 @@ public class ExtraDesignClassManager extends AbstractExtraClassManager implement @Override protected boolean mountSpecific(PluginSingleInjection injection) { - - if (ShortCut.TEMPLATE_TREE.equals(injection.getName()) && injection.getOriginalObject() instanceof ShortCut) { - shortCuts.put(injection.getObject(), (ShortCut) injection.getOriginalObject()); + + if (ShortCut.TEMPLATE_TREE.equals(injection.getName()) && injection.getObject() instanceof ShortCut) { + shortCuts.add((ShortCut) injection.getObject()); return true; } return false; } public Set getExtraShortCuts() { - - return shortCuts.getSet(); + + return Collections.unmodifiableSet(shortCuts); } } \ No newline at end of file