Package net.sf.jaxodraw.plugin
Class JaxoPluginInfo
java.lang.Object
net.sf.jaxodraw.plugin.JaxoPluginInfo
Collects information about available plugins.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPlugin
(JaxoPlugin plugin) Add a plugin to the list of plugins.Returns the list of available plugins as a String.Returns the plugins that are available at runtime.Installed export formats.Return an import plugin that is capable of importing a given format.Installed import formats.static JaxoPluginInfo
The only method to access the JaxoPluginInfo object.void
removePlugin
(JaxoPlugin plugin) Removes the given JaxoPlugin from the list of plugins.void
Re-scans the plugin dir, loading any found plugins.
-
Method Details
-
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
Returns the list of available plugins as a String.- Returns:
- The list of available plugins.
-
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
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
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
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 inJaxoPluginLoader
.- Parameters:
plugin
- the plugin to add. If this is not and instance of eitherJaxoExportPlugin
orJaxoImportPlugin
, does nothing.
-
removePlugin
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
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.
-