From 58eea3a9e866b8027d158fb001068f22851fd75a Mon Sep 17 00:00:00 2001 From: "alex.sung" Date: Mon, 29 Jul 2019 18:11:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=97=B6=E4=BB=8E?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E9=87=8C=E6=8D=9E=E4=B8=80=E6=8A=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/itree/filetree/FileNodeConstants.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeConstants.java b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeConstants.java index a6757ee2b..f9870e3c3 100644 --- a/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeConstants.java +++ b/designer-base/src/main/java/com/fr/design/gui/itree/filetree/FileNodeConstants.java @@ -20,9 +20,13 @@ import java.util.Set; */ public class FileNodeConstants { - private static List supportFileType = new ArrayList(Arrays.asList(FRContext.getFileNodes().getSupportedTypes())); + private static List supportFileType; + + private FileNodeConstants(){} static { + initSupportedTypes(); + GeneralContext.listenPluginRunningChanged(new PluginEventListener() { @Override public void on(PluginEvent pluginEvent) { @@ -49,6 +53,15 @@ public class FileNodeConstants { } } + private static void initSupportedTypes() { + supportFileType = new ArrayList(Arrays.asList(FRContext.getFileNodes().getSupportedTypes())); + //通过插件扩展的 + Set apps = ExtraDesignClassManager.getInstance().getArray(App.MARK_STRING); + for (App app : apps) { + addAppExtensions(app.defaultExtensions()); + } + } + public static String[] getSupportFileTypes() { return supportFileType.toArray(new String[0]); }