From a9a75cf03416bd4ec8bf0253c63175b00adf1870 Mon Sep 17 00:00:00 2001 From: Kalven Date: Fri, 6 Sep 2019 16:22:08 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-1161=20=E6=A0=B9=E6=8D=AEpr=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/plugin/widget/ztree/core/ZTree.java | 12 ++++++--- .../ztree/core/ZTreeFunctionProcessor.java | 27 ------------------- .../com/fr/plugin/widget/ztree/ui/XZTree.java | 5 ++-- 3 files changed, 11 insertions(+), 33 deletions(-) delete mode 100644 src/main/java/com/fr/plugin/widget/ztree/core/ZTreeFunctionProcessor.java diff --git a/src/main/java/com/fr/plugin/widget/ztree/core/ZTree.java b/src/main/java/com/fr/plugin/widget/ztree/core/ZTree.java index 6ef09b6..6d17cc2 100644 --- a/src/main/java/com/fr/plugin/widget/ztree/core/ZTree.java +++ b/src/main/java/com/fr/plugin/widget/ztree/core/ZTree.java @@ -7,6 +7,8 @@ import com.fanruan.api.runtime.PluginKit; import com.fanruan.api.xml.XmlKit; +import com.fr.intelli.record.Focus; +import com.fr.record.analyzer.EnableMetrics; import com.fr.stable.fun.FunctionProcessor;//过时 import com.fr.general.ModuleContext;//过时方法 @@ -31,6 +33,7 @@ import com.fr.plugin.ExtraClassManager; /** * Created by richie on 15/11/17. */ +@EnableMetrics public class ZTree extends CustomWriteAbleRepeatEditor implements DataControl { private WidgetValue widgetValue; @@ -117,16 +120,17 @@ public class ZTree extends CustomWriteAbleRepeatEditor implements DataControl { return "ztree"; } + @Override public JSONObject createJSONConfig(Repository repo, Calculator c, NodeVisitor toFindChart) throws JSONException { JSONObject conf = super.createJSONConfig(repo, c, toFindChart); if (treeAttr != null) { treeAttr.mixConfig(conf); } - FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor(); - if (processor != null) { - processor.recordFunction(ZTreeFunctionProcessor.getInstance()); - } +// FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor(); +// if (processor != null) { +// processor.recordFunction(ZTreeFunctionProcessor.getInstance()); +// } return conf; } diff --git a/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeFunctionProcessor.java b/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeFunctionProcessor.java deleted file mode 100644 index bdbe3ec..0000000 --- a/src/main/java/com/fr/plugin/widget/ztree/core/ZTreeFunctionProcessor.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.fr.plugin.widget.ztree.core; - -import com.fanruan.api.function.FunctionKit; -import com.fr.plugin.widget.ztree.tools.ZTreeConstants; - -import com.fr.stable.fun.impl.AbstractFunctionProcessor;//废弃 - -/** - * Created by richie on 15/12/2. - */ -public class ZTreeFunctionProcessor extends AbstractFunctionProcessor { - - private static ZTreeFunctionProcessor instance = new ZTreeFunctionProcessor(); - - public static ZTreeFunctionProcessor getInstance() { - return instance; - } - - public int getId() { - return FunctionKit.generateFunctionID(ZTreeConstants.PLUGIN_ID); - } - - @Override - public String getLocaleKey() { - return "Plugin-ZTree_Widget_Name"; - } -} \ No newline at end of file diff --git a/src/main/java/com/fr/plugin/widget/ztree/ui/XZTree.java b/src/main/java/com/fr/plugin/widget/ztree/ui/XZTree.java index 1231524..ed6c2aa 100644 --- a/src/main/java/com/fr/plugin/widget/ztree/ui/XZTree.java +++ b/src/main/java/com/fr/plugin/widget/ztree/ui/XZTree.java @@ -8,6 +8,7 @@ import com.fanruan.api.design.work.form.creator.XFieldEditor; import com.fanruan.api.design.work.form.editor.WidgetValueEditor; import com.fanruan.api.design.work.form.macro.XCreatorConstants; import com.fanruan.api.i18n.I18nKit; +import com.fanruan.api.util.ArrayKit; import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XWScaleLayout; @@ -18,7 +19,7 @@ import com.fr.plugin.widget.ztree.ui.editor.ZTreeStyleEditor; import com.fr.plugin.widget.ztree.ui.renderer.ZTreeCascadeRenderer; import com.fr.plugin.widget.ztree.ui.renderer.ZTreeModelRenderer; import com.fr.plugin.widget.ztree.ui.renderer.ZTreeStyleRenderer; -import com.fr.stable.ArrayUtils; +//import com.fr.stable.ArrayUtils; //有问题 import com.fr.design.designer.creator.CRPropertyDescriptor; @@ -60,7 +61,7 @@ public class XZTree extends XFieldEditor { .setRendererClass(ZTreeCascadeRenderer.class) .putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced") }; - return (CRPropertyDescriptor[])ArrayUtils.addAll(super.supportedDescriptor(), crp); + return (CRPropertyDescriptor[]) ArrayKit.addAll(super.supportedDescriptor(), crp); } protected JComponent initEditor() {