From a7a54cd2b5dec92165cacd0a98d269eeefbd9986 Mon Sep 17 00:00:00 2001 From: loy Date: Tue, 23 Aug 2016 15:56:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/fun/JavaScriptActionProvider.java | 6 ++++++ ...AbstractJavaScriptActionExtensionProvider.java | 15 --------------- .../impl/AbstractJavaScriptActionProvider.java | 5 +++++ .../design/javascript/JavaScriptActionPane.java | 5 +---- 4 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java diff --git a/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java b/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java index dfb4cdca09..f860b3b148 100644 --- a/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java +++ b/designer_base/src/com/fr/design/fun/JavaScriptActionProvider.java @@ -1,6 +1,7 @@ package com.fr.design.fun; import com.fr.design.beans.FurtherBasicBeanPane; +import com.fr.design.javascript.JavaScriptActionPane; import com.fr.js.JavaScript; import com.fr.stable.fun.mark.Mutable; @@ -13,6 +14,11 @@ public interface JavaScriptActionProvider extends Mutable{ int CURRENT_LEVEL = 1; + /** + * 传给插件额外参数 + * @param pane + */ + void setJavaScriptActionPane(JavaScriptActionPane pane); FurtherBasicBeanPane getJavaScriptActionPane(); } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java deleted file mode 100644 index 5baaddde88..0000000000 --- a/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionExtensionProvider.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.fr.design.fun.impl; - -import com.fr.design.javascript.JavaScriptActionPane; - -/** - * Created by loy on 16/8/23. - */ -public abstract class AbstractJavaScriptActionExtensionProvider extends AbstractJavaScriptActionProvider { - - /** - * 传给插件额外参数 - * @param pane - */ - public abstract void setJavaScriptActionPane(JavaScriptActionPane pane); -} diff --git a/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java b/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java index 504a8b73ef..6356970746 100644 --- a/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java +++ b/designer_base/src/com/fr/design/fun/impl/AbstractJavaScriptActionProvider.java @@ -1,6 +1,7 @@ package com.fr.design.fun.impl; import com.fr.design.fun.JavaScriptActionProvider; +import com.fr.design.javascript.JavaScriptActionPane; import com.fr.stable.fun.impl.AbstractProvider; import com.fr.stable.fun.mark.API; @@ -18,4 +19,8 @@ public abstract class AbstractJavaScriptActionProvider extends AbstractProvider public String mark4Provider() { return getClass().getName(); } + + @Override + public void setJavaScriptActionPane(JavaScriptActionPane pane) { + } } \ No newline at end of file diff --git a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java index cd6f9eeb6b..a74f3deca9 100644 --- a/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer_base/src/com/fr/design/javascript/JavaScriptActionPane.java @@ -3,7 +3,6 @@ package com.fr.design.javascript; import com.fr.design.ExtraDesignClassManager; import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.fun.JavaScriptActionProvider; -import com.fr.design.fun.impl.AbstractJavaScriptActionExtensionProvider; import com.fr.design.gui.frpane.UIComboBoxPane; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.DesignerContext; @@ -57,9 +56,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { Set javaScriptActionProviders = ExtraDesignClassManager.getInstance().getArray(JavaScriptActionProvider.XML_TAG); if (javaScriptActionProviders != null) { for (JavaScriptActionProvider jsp : javaScriptActionProviders) { - if (jsp instanceof AbstractJavaScriptActionExtensionProvider) { - ((AbstractJavaScriptActionExtensionProvider) jsp).setJavaScriptActionPane(this); - } + jsp.setJavaScriptActionPane(this); paneList.add(jsp.getJavaScriptActionPane()); } }