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 a6757ee2b5..f9870e3c35 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]); }