Class JaxoPluginInfo


  • public final class JaxoPluginInfo
    extends java.lang.Object
    Collects information about available plugins.
    Since:
    2.0
    • Method Detail

      • getPluginInfo

        public static JaxoPluginInfo getPluginInfo()
        The only method to access the JaxoPluginInfo object.
        Returns:
        The singleton instance variable of this JaxoPluginInfo object.
      • reValidate

        public void reValidate()
        Re-scans the plugin dir, loading any found plugins.
      • availablePlugins

        public java.lang.String availablePlugins()
        Returns the list of available plugins as a String.
        Returns:
        The list of available plugins.
      • getAvailablePlugins

        public java.util.Set<java.lang.String> getAvailablePlugins()
        Returns the plugins that are available at runtime. Elements are Strings of class names.
        Returns:
        A copy of the set of available plugins.
      • getExportFormats

        public java.util.List<java.lang.Object> getExportFormats()
        Installed export formats. This includes the built-in formats plus any formats that are available at runtime via plugins. Elements are either Lists (containing a subgroup of JaxoExportPlugin formats), or a JaxoExportPlugin.
        Returns:
        A copy of the list of export formats.
      • getImportFormats

        public java.util.List<JaxoImportPlugin> getImportFormats()
        Installed import formats. This includes the built-in formats plus any formats that are available at runtime via plugins. Elements are either Lists (containing a subgroup of JaxoImportPlugin formats), or a JaxoImportPlugin.
        Returns:
        A copy of the list of import formats.
      • addPlugin

        public void addPlugin​(JaxoPlugin plugin)
        Add a plugin to the list of plugins. *Note* that this does not check whether the plugin is currently on the classpath, it is assumed that the plugin has previously been loaded with the methods in JaxoPluginLoader.
        Parameters:
        plugin - the plugin to add. If this is not and instance of either JaxoExportPlugin or JaxoImportPlugin, does nothing.
      • removePlugin

        public void removePlugin​(JaxoPlugin plugin)
        Removes the given JaxoPlugin from the list of plugins. If the plugin has been added previously, it stays on the classpath of the running instance of JaxoDraw.
        Parameters:
        plugin - the plugin to remove.
      • getImportForExtension

        public JaxoImportPlugin getImportForExtension​(java.lang.String ext)
        Return an import plugin that is capable of importing a given format. Note that this just returns the first plugin found for the given extension, this might not be the correct one if different plugins use the same extension.
        Parameters:
        ext - the file extension.
        Returns:
        A JaxoImportPlugin, or null if none was found for the given extension.